IGameObjectCreatorListener Interface

Definition

Optional interface that GameObjects (instantiated and recycled by a GameObjectPool) can implement in order to handle preparation for recycling and reuse.

public interface class IGameObjectCreatorListener
public interface IGameObjectCreatorListener
type IGameObjectCreatorListener = interface
Public Interface IGameObjectCreatorListener

Methods

PrepareForRecycle()

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.

PrepareForUse()

Called before the GameObject's position and rotation are set (as well as its active state) by the GameObjectPool when GetGameObject is called.

Applies to