GameObjectCreator.PrepareForRecycle(GameObject) Method

Definition

Called when the GameObject is about to be recycled by the GameObjectPool. This allows you to potentially free up any resources before it is deactivated by the GameObjectPool. If the GameObject has a component that implements the IGameObjectCreatorHandler interface, it will call its PrepareForRecycle function.

public:
 virtual void PrepareForRecycle(UnityEngine::GameObject ^ obj);
public virtual void PrepareForRecycle (UnityEngine.GameObject obj);
abstract member PrepareForRecycle : UnityEngine.GameObject -> unit
override this.PrepareForRecycle : UnityEngine.GameObject -> unit
Public Overridable Sub PrepareForRecycle (obj As GameObject)

Parameters

obj
UnityEngine.GameObject

The GameObject that is about to be recycled.

Applies to