GameObjectCreator.PrepareForRecycle(GameObject) 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.
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.