Пример #1
0
 internal static void DestroyNow(GameObject gameObject)
 {
     gameObject._markedForDestruction = true; //just in case
     gameObject.OnDestroy();
     gameObject.components.ForEach(g => g.component.Dispose());
     gameObject.components = null;
     GameState.RemoveObject(gameObject);
 }
Пример #2
0
 internal static void DestroyNow(GameObject gameObject)
 {
     gameObject._markedForDestruction = true; //just in case
     gameObject.OnDestroy();
     gameObject.components.ForEach(g => g.component.Dispose());
     gameObject.components = null;
     GameState.RemoveObject(gameObject);
 }
Пример #3
0
 /// <summary>
 /// Destroy this gameObject. THIS IS NOT NETWORKED SYNCED.
 /// </summary>
 /// <param name="gameObject"></param>
 public static void Destroy(GameObject gameObject)
 {
     gameObject.OnDestroy();
     gameObject.components.ForEach(g => g.component.Dispose());
     gameObject.components = null;
     GameState.RemoveObject(gameObject);
 }