GenericPrefabInstanceCreator Class

Definition

Creator for making prefab instances

public ref class GenericPrefabInstanceCreator : Microsoft::MixedReality::Toolkit::Utilities::GameObjectManagement::GameObjectCreator
public class GenericPrefabInstanceCreator : Microsoft.MixedReality.Toolkit.Utilities.GameObjectManagement.GameObjectCreator
type GenericPrefabInstanceCreator = class
    inherit GameObjectCreator
Public Class GenericPrefabInstanceCreator
Inherits GameObjectCreator
Inheritance
GenericPrefabInstanceCreator

Constructors

GenericPrefabInstanceCreator()

Fields

Prefab

The prefab to instantiate

Methods

Instantiate()

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

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.

(Inherited from GameObjectCreator)
PrepareForUse(GameObject)

Called before the GameObject's position and rotation are set (as well as its 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.

(Inherited from GameObjectCreator)

Applies to

See also