When i to perform this operation:
static var Player : PlayerVariables;
class PlayerVariables
{
var PlayerObj : GameObject;
}
Start()
{
Player.PlayerObj = GameObject.Find("Player"); // there is a object in the scene called Player
}
i get a NullReferenceException: Object reference not set to an instance of an object
what am i doing wrong?