Hello all, i’m currently in the process of adding multiplayer into my game and have found an issue where many of my scripts reference scripts attached to the player which is declared in the void Start. if the player is not in the scene when the scripts use void Start then the player is never found so none of my scripts work.
so long story shortish how can i make my scripts say
"when the player has spawned
GameObject Player = GameObject.Find("Player");
CharacterControler characterControler = Player.GetComponent<CharacterControler>();
then continue with script". the only idea i had was making it check in the update and using something like “if player != null” but i imagine that would be very wasteful.
thanks for any help.
ps. im using Photon Networking if that makes any difference.