Table of Contents

Method Spawn

Namespace
Pinwheel.Griffin
Assembly
Pinwheel.Polaris.Runtime.dll

Spawn(GStylizedTerrain, GameObject, Vector3, Transform)

Instantiate a cloned object of a prefab and place it under the terrain. This function also records undo in the editor.

public static GameObject Spawn(GStylizedTerrain terrain, GameObject prototype, Vector3 worldPos, Transform parent = null)

Parameters

terrain GStylizedTerrain

The terrain object.

prototype GameObject

The prefab.

worldPos Vector3

World position of spawned object.

parent Transform

Parent transform of spawned object. If null, a default root object will be used.

Returns

GameObject

The spawned object.