CameraScript
How do I use Camera Script
Below are practical examples compiled from projects for learning and reference purposes
Featured Snippets
Line | Code | Ex.. |
---|---|---|
11 |
cameraScript = GetComponent |
1 |
File name: ThirdPersonNetwork.cs
Copy
9 void Awake()
10 {
11 cameraScript = GetComponent
12 controllerScript = GetComponent
13
14 if (photonView.isMine)
15 {
16 //MINE: local player, simply enable the local scripts
17 cameraScript.enabled = true;
18 controllerScript.enabled = true;
19 }
20 else
21 {
22 cameraScript.enabled = false;
23
24 controllerScript.enabled = true;
25 controllerScript.isControllable = false;
26 }
27
28 gameObject.name = gameObject.name + photonView.viewID;
29 }
Download file with original file name:CameraScript
CameraScript 120 lượt xem
Gõ tìm kiếm nhanh...