Table of Contents

Class GSpawner

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

Utility class for spawning game object on the terrain.

public static class GSpawner
Inheritance
GSpawner
Inherited Members

Methods

DestroyIf(GStylizedTerrain, Predicate<GameObject>)

Destroy instances of all prefabs under a terrain, matching a condition. The condition will be tested against each instance under default root object, whose name starts with ~Root

DestroyIf(GStylizedTerrain, GameObject, Predicate<GameObject>)

Destroy instances of a prefab under a terrain, matching a condition.

GetPrototypeRootName(GameObject)

Get the root game object name for spawning a prefab into, use this to keep the hierarchy clean.

GetRoot(GStylizedTerrain, GameObject)

Get the root game object to spawn a prefab into. This will return a child game object of the terrain, all instances of the same prefab will be placed under this object.

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.