Is there a reason I can’t add one of my JS files as a game object ? I have this :
var cameraMode : GameObject;
But when I go back to Unity, I cannot drag the cameraMode.js on to the variable.
Is there a reason I can’t add one of my JS files as a game object ? I have this :
var cameraMode : GameObject;
But when I go back to Unity, I cannot drag the cameraMode.js on to the variable.
A script is not a gameObject, it is a component.
In C# you can use a script as a variable class.
someScript scriptAccessor;