Ejemplo n.º 1
0
 public static void EnsureInitialized()
 {
     try
     {
         if (EventPump.Instance == null)
         {
             lock (s_Lock)
             {
                 if (EventPump.Instance == null)
                 {
                     UnityEngine.GameObject parent = new UnityEngine.GameObject("Kinect Desktop Event Pump");
                     EventPump.Instance = parent.AddComponent<Helper.EventPump>();
                     DontDestroyOnLoad(parent);
                 }
             }
         }
     }
     catch
     {
         UnityEngine.Debug.LogError("Events must be registered on the main thread.");
         return;
     }
 }