Set value of own class in inspector

Hi!

I have this class that has derived from ‘Object’ and thus it is shown in the inspector where I want to give it a value.

I can neither drag and drop from the project list nor click the button @ inspector to give this variable any value tough!

Since it’s an Object I can’t really put it onto a Game-object wich seems to be the way to go with mono-behaviours and such.

The class is called ‘Effect’ and has 3 classes that derives from it, neither can be dragged onto the value slot.

Would appreciate any help with this,

Regards, Joakim

Hi, welcome to the forum!

The best way to handle this is to either re-code the class so that it derives from MonoBehaviour or else add an public variable of that class to another script that derives from MonoBehaviour. You can then drag the MonoBehaviour script onto a GameObject and link the script in the inspector to access it. As you say, only Component classes (including MonoBehaviour) can be dragged onto variables to link them in the inspector.