-
Notifications
You must be signed in to change notification settings - Fork 0
IPoolable.OnPoolUnSpawn
Andrés Eduardo Maldonado edited this page Jun 14, 2019
·
3 revisions
Method from IPoolable (interface)
public void OnPoolUnSpawn()
Called before the object needs to go back to the pool.
public class ExampleScript : MonoBehaviour, IPoolable
{
private int counter;
public void OnPoolSpawn()
{
counter++;
Debug.Log("I've been spawned " + counter + "times!");
}
public void OnPoolUnSpawn()
{
// Other events here.
}
}