Rent Method
- Namespace
- SatorImaging.UnityFundamentals
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
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)