Search for a Prefab (camera script)


I’ve made a player prefab and I have a playerSpawn script to spawn him into the map.
The problem is that the camera doesn’t follow him. I’ve dragged the prefab into the player slot (camera). After the player has spawned nothing happend. I tried it with a Start function.


But it doesn’t worked right.



Either use GameObject.Find(“name”).gameObject, or put your gameObject somewhere inside the Resources folder and use Resources.Load(“path to filename”, gameObject).