mrtk_developmentreleases/2.0.0releases/2.1.0releases/2.2.0

    Show / Hide Table of Contents

    Class GameObjectCreator

    An abstract class used by the GameObjectPool for creating and recycling game objects.

    Inheritance
    Object
    GameObjectCreator
    GenericPrefabInstanceCreator
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Microsoft.MixedReality.Toolkit.Utilities.GameObjectManagement
    Assembly: cs.temp.dll.dll
    Syntax
    public abstract class GameObjectCreator

    Methods

    Instantiate()

    Creates a GameObject for the GameObjectPool. The position and rotation of the GameObject is set by the GameObjectPool when GetGameObject is called.

    Declaration
    public abstract GameObject Instantiate()
    Returns
    Type Description
    GameObject

    An instantiated GameObject.

    Instantiate()

    Creates a GameObject for the GameObjectPool. The position and rotation of the GameObject is set by the GameObjectPool when GetGameObject is called.

    Declaration
    public abstract GameObject Instantiate()
    Returns
    Type Description
    GameObject

    An instantiated GameObject.

    PrepareForRecycle(GameObject)

    Called when the GameObject is about to be recycled by the GameObjectPool. This allows you to potentially free up any resources before it is deactivated by the GameObjectPool. If the GameObject has a component that implements the IGameObjectCreatorHandler interface, it will call its PrepareForRecycle function.

    Declaration
    public virtual void PrepareForRecycle(GameObject obj)
    Parameters
    Type Name Description
    GameObject obj

    The GameObject that is about to be recycled.

    PrepareForRecycle(GameObject)

    Called when the GameObject is about to be recycled by the GameObjectPool. This allows you to potentially free up any resources before it is deactivated by the GameObjectPool. If the GameObject has a component that implements the IGameObjectCreatorHandler interface, it will call its PrepareForRecycle function.

    Declaration
    public virtual void PrepareForRecycle(GameObject obj)
    Parameters
    Type Name Description
    GameObject obj

    The GameObject that is about to be recycled.

    PrepareForUse(GameObject)

    Called before the GameObject's position and rotation are set (as well as it's active state) by the GameObjectPool when GetGameObject is called. If the GameObject has a component that implements the IGameObjectCreatorHandler interface, it will call its PrepareForUse function.

    Declaration
    public virtual void PrepareForUse(GameObject obj)
    Parameters
    Type Name Description
    GameObject obj

    The GameObject that is about to be used.

    PrepareForUse(GameObject)

    Called before the GameObject's position and rotation are set (as well as it's active state) by the GameObjectPool when GetGameObject is called. If the GameObject has a component that implements the IGameObjectCreatorHandler interface, it will call its PrepareForUse function.

    Declaration
    public virtual void PrepareForUse(GameObject obj)
    Parameters
    Type Name Description
    GameObject obj

    The GameObject that is about to be used.

    In This Article
    • Methods
      • Instantiate()
      • Instantiate()
      • PrepareForRecycle(GameObject)
      • PrepareForRecycle(GameObject)
      • PrepareForUse(GameObject)
      • PrepareForUse(GameObject)
    Back to top Generated by DocFX