Table of Contents

Rent Method

Rent(bool, Transform?, bool)

public static TSelf Rent(bool activateGameObject, Transform? parent = null, bool worldPositionStays = true)

Get pooled instance or create new if pool is empty. Call ReturnToPool() to reuse instance.

Parameters

activateGameObject bool
parent Transform?
worldPositionStays bool

Returns

TSelf

Remarks

NOTE: if no parent is specified, host GameObject will be marked as DontDestroyOnLoad otherwise destroyed with parent or scene. (destroyed instance won't be reused)