Ok , so i got this little snippet here, and the strange thing is , via the debug log i can most definately tell that the object has been found , and displayed to the console, but than on the very next line , i get a null ref thrown…
Maybe im just way to damn tired today , not sure, but heres the very simplistic snippet… today i feel brain dead.
var scifiPod : Transform;
function InitiatePod01Cine(playerSpawn : GameObject){
var pod : Transform = Network.Instantiate(scifiPod, transform.position, transform.rotation, 0);
Debug.Log(playerSpawn.name);
pod.gameObject.SendMessage("BeginPodFlight", playerSpawn, SendMessageOptions.DontRequireReciever);
}
NullReferenceException: Object reference not set to an instance of an object
PodSpawn.InitiatePod01Cine (UnityEngine.GameObject playerSpawn) (at Assets/Scripts/PodSpawn.js:6)
UnityEngine.GameObject:SendMessage(String, Object, SendMessageOptions)
GameData:FlagPlayerSpawn(Int32) (at Assets/Scripts/GameData.js:122)
LobbyInterface:SynchMapToNetwork() (at Assets/Scripts/LobbyInterface.js:454)