Beispiel #1
0
 public static PlayishManager getInstance()
 {
     if (currentInstance == null)
     {
         var playishManager = new GameObject("PlayishManager");
         currentInstance = playishManager.AddComponent <PlayishManager> ();
     }
     return(currentInstance);
 }
Beispiel #2
0
        // ---- MARK: Setup

        private void Awake()
        {
            if (currentInstance == null)
            {
                currentInstance = this;
            }
            else if (currentInstance != null && this.GetHashCode() != currentInstance.GetHashCode())
            {
                DestroyImmediate(transform.gameObject);
                return;
            }

            DeviceManager.getInstance().clearDevices();
        }