Public GameObject vs internal GameObject

Is there a reason why the lecture used that ugly old find function to locate the player instead of just making the player variable public and dragging the player object into the value slot via the editor?

I’m not sure, my guess is so that the script grabs the reference itself. That way if you have, maximum of 4 players and a minimum of 1 that the camera has to keep track of you can’t just drag the appropriate player into the spot when generated in-game. Just a guess though

Privacy & Terms