Advertisement
Munchy2007

PunTutPart4_2

Sep 8th, 2016
7,950
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. using UnityEngine.UI;
  4.  
  5. namespace PUNTutorial
  6. {
  7.     public class HUD : MonoBehaviour {
  8.         static HUD instance;
  9.  
  10.         void Awake () {
  11.             if(instance != null)
  12.             {
  13.                 DestroyImmediate(gameObject);
  14.                 return;
  15.             }
  16.             instance = this;
  17.             DontDestroyOnLoad(gameObject);
  18.         }
  19.        
  20.     }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement