Gamer
1
HI to all,
i want to make a variable null.I dont know how to achieve in javascript.
var gameobject1 : GameObject;
if(gameobject1 == Null)
{
gameobject1 = GameObject.Find(“Player”);
}
else
{
gameobject1 = Null; ///// #pragma strict doesn’t allow this gameobject1 = “” ;
}
help me guys ,Thanks in advance
regard’s
rajesh
Null should be lower case: null
Perhaps also you need to give gameobject1 an initalized value before accessing it:
var gameobject1 : GameObject = null;
if (gameobject1 == null)
{
…
What kind of errors you got?
Null should be lower case: null - lol how did i miss that?
Gamer
4
null working fine thanks guys. I thought reserved word change its color to red.