API reference
API reference
Select your platform
No SDKs available
No versions available

PoolManagerSingleton Class

This class is a singleton that manages the pool of GameObjects used by Scene Decorator.

Properties

Gets the pool manager for GameObjects.

Member Functions

Creates a new instance of the specified GameObject at the given position and rotation, attached to the provided MRUKAnchor.
The new GameObject will be parented to the optional parent Transform if provided.
Parameters
primitive
The primitive GameObject to instantiate.
position
The position of the new GameObject in world space.
rotation
The rotation of the new GameObject in world space.
anchor
The MRUKAnchor to which the new GameObject will be attached.
parent
An optional parent Transform for the new GameObject. Defaults to null.
Returns
The newly created GameObject instance, or null if creation failed.
Creates a new instance of the specified GameObject at the position and rotation defined by the provided MRUKAnchor.
The new GameObject will be parented to the optional parent Transform if provided.
Parameters
primitive
The primitive GameObject to instantiate.
anchor
The MRUKAnchor that defines the position and rotation of the new GameObject.
parent
An optional parent Transform for the new GameObject. Defaults to null.
instantiateInWorldSpace
If true, the new GameObject will be instantiated in world space instead of local space. Defaults to false.
Returns
The newly created GameObject instance, or null if creation failed.
Creates a new instance of the specified component type, attached to a GameObject created from the given primitive.
The GameObject is positioned and rotated according to the provided parameters, and optionally parented to another Transform.
Parameters
primitive
The primitive object used to create the new GameObject.
position
The position of the new GameObject in world space.
rotation
The rotation of the new GameObject in world space.
anchor
The MRUKAnchor to which the new GameObject will be attached.
parent
An optional parent Transform for the new GameObject. Defaults to null.
Others
T
The type of component to create and attach to the new GameObject.
Returns
The newly created component instance, or null if creation failed.
Creates a new instance of the specified component type, attached to a GameObject created from the given primitive.
The GameObject is positioned and rotated according to the provided MRUKAnchor, and optionally parented to another Transform.
Parameters
primitive
The primitive object used to create the new GameObject.
anchor
The MRUKAnchor to which the new GameObject will be attached.
parent
An optional parent Transform for the new GameObject. Defaults to null.
instantiateInWorldSpace
If true, the new GameObject will be instantiated in world space instead of local space. Defaults to false.
Others
T
The type of component to create and attach to the new GameObject.
Returns
The newly created component instance, or null if creation failed.
Releases a GameObject back to its pool or destroys it if it's not pooled.
Parameters
go
The GameObject to release.
Did you find this page helpful?
Thumbs up icon
Thumbs down icon