GameObjectExt.CreateGameObjectAndParentSameTransform Method

Creates a new GameObject in the exact same position as the given one and parents it.

Namespace: UltimateXR.Extensions.Unity
Assembly: UltimateXR (in UltimateXR.dll) Version: 0.0.0.0

Syntax

C#

public static GameObject CreateGameObjectAndParentSameTransform(
	GameObject parent,
	string newGameObjectName
)

Parameters

 

parent
Type: GameObject
GameObject to parent the new object to and also place it at the same position and with the same orientation
newGameObjectName
Type: System.String
Name for the new GameObject

Return Value

Type: GameObject
New created GameObject

See Also

Reference

GameObjectExt Class
UltimateXR.Extensions.Unity Namespace