Advertisement
Munchy2007

PunTutPart2_0

Jul 25th, 2016
10,535
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 GameManager : Photon.PunBehaviour {
  7.         public static GameManager instance;
  8.  
  9.         void Awake()
  10.         {
  11.             if(instance != null)
  12.             {
  13.                 DestroyImmediate(gameObject);
  14.                 return;
  15.             }
  16.             DontDestroyOnLoad(gameObject);
  17.             instance = this;
  18.         }
  19.     }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement