Advertisement
kasru

Network View

Mar 11th, 2013
6,191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //****** Donations are greatly appreciated.  ******
  2. //****** You can donate directly to Jesse through paypal at  https://www.paypal.me/JEtzler   ******
  3.  
  4. function Awake() {
  5.  
  6.     if (!networkView.isMine){ GetComponentInChildren(Camera).enabled = false;
  7.         // disable the camera of the non-owned Player;
  8.         GetComponentInChildren(AudioListener).enabled = false;
  9.  
  10.         // Disables AudioListener of non-owned Player - prevents multiple AudioListeners from being present in scene.
  11.         GetComponentInChildren(MouseLook).enabled = false; GetComponentInChildren(FPSInputController).enabled = false;
  12.     }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement