Question by
KeeganSPC · May 28, 2016 at 06:37 PM ·
camerajavascriptcamerassplitscreen
Can't find second camera in Javascript
Making a splitscreen game and I need to find the camera of the second player in Javascript so that I can update the text of how many laps the player has been around the race course.
I'm very new to Unity so please make it easy to understand, thanks
Comment
Answer by Wolfrik_Creations · May 29, 2016 at 10:16 PM
Try to set the first camera's name to "Cam1" and the second as "Cam2" and then use "GameObject.Find("Cam1").GetComponent.()" and the same with Cam2 except change the string.
I hope this was easy to understand.
Your answer
Follow this Question
Related Questions
Switch between 5 cameras in the game by clicking. 0 Answers
How to rotate camera view? 0 Answers
How to speed up cinemachine virtual camera transition? 1 Answer
Convert Js yo C# 1 Answer
Hide GameObject and children 0 Answers