GameObjectPool.GetGameObject Method

Definition

Overloads

GetGameObject(String)

Same as calling GetGameObject(objectIdentifier, Vector3.zero, Quaternion.identity)

GetGameObject(String, Vector3, Quaternion)

Gets a game object for a specific object identifier from the GameObjectPool. If the kind of game object being requested is not in the pool, then it will get created by a IGameObjectCreator that was added to the pool for handling objects associated with the objectIdentifier.

GetGameObject(String)

Same as calling GetGameObject(objectIdentifier, Vector3.zero, Quaternion.identity)

public:
 UnityEngine::GameObject ^ GetGameObject(System::String ^ objectIdentifier);
public UnityEngine.GameObject GetGameObject (string objectIdentifier);
member this.GetGameObject : string -> UnityEngine.GameObject
Public Function GetGameObject (objectIdentifier As String) As GameObject

Parameters

objectIdentifier
String

The identifier you want to use to identify the kind of game object you want to retrieve.

Returns

UnityEngine.GameObject

Applies to

GetGameObject(String, Vector3, Quaternion)

Gets a game object for a specific object identifier from the GameObjectPool. If the kind of game object being requested is not in the pool, then it will get created by a IGameObjectCreator that was added to the pool for handling objects associated with the objectIdentifier.

public:
 UnityEngine::GameObject ^ GetGameObject(System::String ^ objectIdentifier, UnityEngine::Vector3 position, UnityEngine::Quaternion rotation);
public UnityEngine.GameObject GetGameObject (string objectIdentifier, UnityEngine.Vector3 position, UnityEngine.Quaternion rotation);
member this.GetGameObject : string * UnityEngine.Vector3 * UnityEngine.Quaternion -> UnityEngine.GameObject
Public Function GetGameObject (objectIdentifier As String, position As Vector3, rotation As Quaternion) As GameObject

Parameters

objectIdentifier
String

The identifier you want to use to identify the kind of game object you want to retrieve.

position
UnityEngine.Vector3

The position that the game object should have before it is activated.

rotation
UnityEngine.Quaternion

The rotation that the game object should have before it is activated.

Returns

UnityEngine.GameObject

Applies to