API reference

PoolManagerSingleton Class

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

Properties

poolManager : PoolManager< GameObject, Pool< GameObject > >
[Get]
Gets the pool manager for GameObjects.
Signature
PoolManager<GameObject, Pool<GameObject> > poolManager

Methods

Create ( primitive , position , rotation , anchor , parent )
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.
Signature
GameObject Create(GameObject primitive, Vector3 position, Quaternion rotation, MRUKAnchor anchor, Transform parent=null)
Parameters
primitive: GameObject  The primitive GameObject to instantiate.
position: Vector3  The position of the new GameObject in world space.
rotation: Quaternion  The rotation of the new GameObject in world space.
anchor: MRUKAnchor  The MRUKAnchor to which the new GameObject will be attached.
parent: Transform  An optional parent Transform for the new GameObject. Defaults to null.
Returns
GameObject  The newly created GameObject instance, or null if creation failed.
Create ( primitive , anchor , parent , instantiateInWorldSpace )
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.
Signature
GameObject Create(GameObject primitive, MRUKAnchor anchor, Transform parent=null, bool instantiateInWorldSpace=false)
Parameters
primitive: GameObject  The primitive GameObject to instantiate.
anchor: MRUKAnchor  The MRUKAnchor that defines the position and rotation of the new GameObject.
parent: Transform  An optional parent Transform for the new GameObject. Defaults to null.
instantiateInWorldSpace: bool  If true, the new GameObject will be instantiated in world space instead of local space. Defaults to false.
Returns
GameObject  The newly created GameObject instance, or null if creation failed.
Create< T > ( primitive , position , rotation , anchor , parent )
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.
Signature
T Create< T >(T primitive, Vector3 position, Quaternion rotation, MRUKAnchor anchor, Transform parent=null)
Parameters
primitive: T  The primitive object used to create the new GameObject.
position: Vector3  The position of the new GameObject in world space.
rotation: Quaternion  The rotation of the new GameObject in world space.
anchor: MRUKAnchor  The MRUKAnchor to which the new GameObject will be attached.
parent: Transform  An optional parent Transform for the new GameObject. Defaults to null.
Returns
T  The newly created component instance, or null if creation failed.
Create< T > ( primitive , anchor , parent , instantiateInWorldSpace )
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.
Signature
T Create< T >(T primitive, MRUKAnchor anchor, Transform parent=null, bool instantiateInWorldSpace=false)
Parameters
primitive: T  The primitive object used to create the new GameObject.
anchor: MRUKAnchor  The MRUKAnchor to which the new GameObject will be attached.
parent: Transform  An optional parent Transform for the new GameObject. Defaults to null.
instantiateInWorldSpace: bool  If true, the new GameObject will be instantiated in world space instead of local space. Defaults to false.
Returns
T  The newly created component instance, or null if creation failed.
Release ( go )
Releases a GameObject back to its pool or destroys it if it's not pooled.
Signature
void Release(GameObject go)
Parameters
go: GameObject  The GameObject to release.
Returns
void