Table of Contents

Method Spawn

Namespace
Pinwheel.Vista
Assembly
Pinwheel.Vista.Runtime.dll

Spawn(GameObject)

Instantiates a GameObject, preserving prefab linkage in the editor when the source object is a prefab asset.

public static GameObject Spawn(GameObject original)

Parameters

original GameObject

Prefab asset or scene object to instantiate.

Returns

GameObject

The spawned GameObject.

Remarks

In the editor this method also registers Undo for the created object. Outside the editor it falls back to a normal runtime instantiate.