Get RAPTOR

RaptorLiquidTool

Hooks for project code to configure placed liquid volumes.

NamespaceAssemblyKindStability
Raptor.EditorToolsRaptor.Editorclasspreview, since 0.1.0

Project code fills these hooks to add its behaviour to a volume and to apply type changes. Each hook holds one provider. The last assignment wins, and null restores the built-in behaviour.

public static class RaptorLiquidTool

Fields

ApplyTypeHook

public static System.Action<GameObject, int> ApplyTypeHook;

Changes the type of the project's liquid component on an existing volume. Called from the RaptorLiquid Inspector's Type dropdown with the volume GameObject and the liquid type (0 for Water, 1 for Toxic, 2 for Electric). The hook applies the type and refreshes the surface material.

SetupZoneHook

public static System.Action<GameObject, int> SetupZoneHook;

Adds and configures the project's liquid component on a newly made liquid volume. Receives the volume GameObject and the liquid type (0 for Water, 1 for Toxic, 2 for Electric). The surface MeshRenderer and trigger BoxCollider are already on the same GameObject, so the component can read both with GetComponent.

TuningNote

public static string TuningNote;

A line shown under the volume's Inspector help, saying where the project's tuning lives. Null shows no line.

Methods

ApplyType

public static void ApplyType(GameObject volume, int liquidType)

Changes an existing volume's type through ApplyTypeHook. Does nothing while the hook is null.

ParameterTypeDescription
volumeGameObjectThe volume.
liquidTypeintThe liquid type: 0 for Water, 1 for Toxic, 2 for Electric.

SetupZone

public static void SetupZone(GameObject volume, int liquidType)

Configures a newly made volume through SetupZoneHook. Does nothing while the hook is null.

ParameterTypeDescription
volumeGameObjectThe volume.
liquidTypeintThe liquid type: 0 for Water, 1 for Toxic, 2 for Electric.