Table of Contents

Method DestroyIf

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

DestroyIf(GStylizedTerrain, GameObject, Predicate<GameObject>)

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

public static void DestroyIf(GStylizedTerrain terrain, GameObject prototype, Predicate<GameObject> condition)

Parameters

terrain GStylizedTerrain

The terrain object.

prototype GameObject

The prefab.

condition Predicate<GameObject>

The condition to test against each instance.

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

public static void DestroyIf(GStylizedTerrain terrain, Predicate<GameObject> condition)

Parameters

terrain GStylizedTerrain

The terrain object.

condition Predicate<GameObject>

The condition to test against each instance.