Exemplo n.º 1
0
 public static void Destroy(UnityObject obj, float time)
 {
     if (obj != null)
     {
         obj.Destroy();
     }
 }
Exemplo n.º 2
0
 public static void DestroyImmediate(UnityObject obj)
 {
     if (obj != null)
     {
         obj.Destroy();
     }
     // TODO: WE should probably clean up after this
 }
Exemplo n.º 3
0
 internal static void UnloadCurrentLevel()
 {
     foreach (UnityObject obj in objects.Values)
     {
         if (obj is GameObject)
         {
             GameObject gObj = (GameObject)obj;
             if (!dontDestroyOnLoad.Contains(gObj))
             {
                 UnityObject.Destroy(gObj);
                 gObj.active = false;
             }
         }
     }
 }