GameObjectExtensions.DestroyGameObject(GameObject, Single) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Destroys GameObject appropriately depending if in edit or playmode
public static void DestroyGameObject (UnityEngine.GameObject gameObject, float t = 0);
static member DestroyGameObject : UnityEngine.GameObject * single -> unit
Public Sub DestroyGameObject (gameObject As GameObject, Optional t As Single = 0)
Parameters
- gameObject
- UnityEngine.GameObject
GameObject to destroy
- t
- Single
time in seconds at which to destroy GameObject if applicable