Class GameObjectUtil

Deprecated

Use Object instead. Example: Object.Instantiate()

Methods

  • Destroys a GameObject.

    Parameters

    • gameObject: GameObject

      GameObject to destroy.

    • Optional delay: number

      The optional amount of time to delay before destroying the object.

    Returns void

  • Instantiate an Object.

    Parameters

    • original: Object

      The object being instantiated.

    Returns GameObject

    The instantiated GameObject.

  • Instantiate an Object positionally.

    Parameters

    • original: Object

      The object being instantiated.

    • position: Vector3

      The position to instantiate object at.

    • rotation: Quaternion

      The rotation with instantiate object with.

    Returns GameObject

    The instantiated GameObject.

  • Instantiate an Object as a child of parent.

    Parameters

    • original: Object

      The object being instantiated.

    • parent: Transform

      The object to instantiate as a child of.

    Returns GameObject

    The instantiated GameObject.