Method DestroyImmediateSafe
DestroyImmediateSafe(GameObject, bool)
Destroys GameObject, but ensure that it is properly unpacked if gameobject is part of a prefab (if editor)
Declaration
public static void DestroyImmediateSafe(this GameObject gameObject, bool undo = true)
Parameters
Type | Name | Description |
---|---|---|
GameObject | gameObject | The gameobject to destroy |
bool | undo | Should an undo operation be recorded |