Advertisement
Munchy2007

PunTutPart3_5

Aug 18th, 2016
11,066
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.33 KB | None | 0 0
  1. using UnityEngine;
  2. using System.Collections;
  3.  
  4. namespace PUNTutorial
  5. {
  6.     public class Player : Photon.PunBehaviour {
  7.         Camera playerCam;
  8.  
  9.         void Awake () {
  10.             DontDestroyOnLoad(gameObject);
  11.             playerCam = GetComponentInChildren<Camera>();
  12.  
  13.             if(!photonView.isMine)
  14.             {
  15.                 playerCam.gameObject.SetActive(false);
  16.             }
  17.         }
  18.     }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement