Cannot drag and assign other class to prefab

Hi, I am new to Unity, so it might be a newbie question, but I could not find the answer on the web.

I have a prefab in my game, ready to collide with the main game object. What I’m trying to do here is that, I have a HUDLayer including the scores, and I have assigned the HUDClass in the prefab script so I could update the scores in the HUD

public HUDClass hud;

With this, in the inspector, it shows that there’s an option to drag and drop the gameObject/script of the HUDClass as a reference to the prefab. But it doesn’t allow me to do that, why is that?

Is there any way to do this?

Thank you.

The reason, as i believe, is because the class has not been created yet…mono behavior classes are created(Instantiated) in editor for purposes of drag/drop…etc. Editor and Runtime are 2 completely different realms, and it wouldnt make sense to make a runtime class available in the editor unless there is a reason…thus: extends MonoBehaviour

this should clear up your problems:

1)Class should be instantiated: var myClass=new MyClass();

2)Class should be same: ‘name’ == ‘script name’ : var myClass:MyClass=new MyClass();