VR Development Framework
v 1.0.0
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events Pages
static Transform AVR.Core.Utils.Misc.CreateEmptyGameObject ( string  name = "EmptyTransform",
Transform  parent = null 
)
inlinestatic

Creates an empty gameobject with a localposition and rotation of zero. Returns its transform component.

Parameters
nameName of the gameobject
parentParent of the gameobject (null for no parent)

Definition at line 251 of file AVR_Utils.cs.

252  {
253  GameObject o = new GameObject(name);
254  o.transform.SetParent(parent);
255  o.transform.localPosition = Vector3.zero;
256  o.transform.localRotation = Quaternion.identity;
257  return o.transform;
258  }