GameObjectCreator Class
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
An abstract class used by the GameObjectPool for creating and recycling game objects.
public ref class GameObjectCreator abstract
public abstract class GameObjectCreator
type GameObjectCreator = class
Public MustInherit Class GameObjectCreator
- Inheritance
-
GameObjectCreator
- Derived
Instantiate() |
Creates a GameObject for the GameObjectPool. The position and rotation of the GameObject is set by the GameObjectPool when GetGameObject is called. |
Prepare |
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. |
Prepare |
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. |
Product | Versions |
---|---|
MRTK2 Unity 2018 | 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.6.0, 2.7.0 |
MRTK2 Unity 2019 | 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.6.0, 2.7.0, 2.8.0 |
MRTK2 Unity 2020 | 2.5.2, 2.5.3, 2.5.4, 2.6.0, 2.7.0, 2.8.0 |