|
I have a game object with a script attached. One of the scripts variables needs to be a javascript (monoscript) file so that I can drag different scripts in there hit run and the script is excecuted at runtime. I have this working fine using myCustomSCript:MonoScript but when I try to build the project I get errors. I understand that MonoScript is an editor script and I tried using MonoBehaviour but that doesnt allow me to drag a custom script into the inspector. Anyone know how to do this???
(comments are locked)
|
|
MonoBehaviour is the usual type for scripts. If it's a variable on something, you need to make sure the script is also in the scene - you can't drag a script from the project straight into a variable.
(comments are locked)
|

Contemplate what you are asking. What is a "script"? An instance of a class?