AndrewRosyaev

PlayerSetup2

Dec 23rd, 2015
290
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.40 KB | None | 0 0
  1. using UnityEngine;
  2. using System.Collections;
  3. using UnityEngine.Networking;
  4.  
  5. public class PlayerSetup2 : NetworkBehaviour {
  6.     public Transform client;
  7.     public Transform me;
  8.  
  9.     void Start ()
  10.     {
  11.         if (isLocalPlayer) {
  12.             client.gameObject.SetActive (false);
  13.             me.gameObject.SetActive (true);
  14.         } else
  15.         {
  16.             client.gameObject.SetActive (true);
  17.             me.gameObject.SetActive (false);
  18.         }
  19.  
  20.     }
  21. }
Add Comment
Please, Sign In to add comment