I added a new public variable to a script attached to my player GameObject. But in that Object’s script component, the variable is not appearing whatsoever, preventing me from accessing it in the editor. Any idea why this could be?
1 Answer
1try this :
//For Game Objects
var MyGameObject : Transform;
//Or
var MyGameObject : GameObject;
//For Sounds
var MyGameObjectSound : AudioClip;
//For Textures :
var MyGameObjectTexture : Texture2D;
//or
var MyGameObjectTexture : GUITexture;
//For Static :
var MyStatic : int = 0;
//or
var MyStatic : float = 0;
Post your script or at least the top portion of it. Note it won't appear if the script other errors preventing it from compiling.
– robertbu