Rotorz Tile System Icon
Rotorz Tile System for Unity
API Reference
Available on the Unity Asset Store
TOC

DestroyObject Method

Destroy object instance.
void DestroyObject(
	GameObject go,
	IObjectFactoryContext context
)
function DestroyObject(
	go : GameObject,
	context : IObjectFactoryContext
)

Parameters

go (GameObject)
The unwanted object.
context (IObjectFactoryContext)
An object describing the context of the game object that is being destroyed. The context object is always specified, though contained members may be null.

Remarks

Object must be un-parented when recycling it:

go.transform.SetParent(null, false);
go.transform.SetParent(null, false);

See Also

Reference