Get RAPTOR

RaptorEntityBodies.Option

One Body option: its label, icon, availability and switching steps.

NamespaceAssemblyKindStability
Raptor.EditorToolsRaptor.Editorclasspreview, since 0.1.0
public sealed class Option

Fields

Body

public RaptorEntityBody Body;

The RaptorEntityBody value this option represents.

CanEnter

public Func<GameObject, string> CanEnter;

Returns why an entity cannot switch to this body, or null if it can. Checked for every entity before anything changes.

CanLeave

public Func<GameObject, string> CanLeave;

Returns why an entity cannot leave this body, or null if it can. Checked for every entity before anything changes.

CollisionWords

public Func<IList<GameObject>, string> CollisionWords;

Optional. Returns the Collision line for a selection, or null to describe the placed colliders. Called when every selected entity's body uses this same function, so two bodies from one provider can describe a mixed selection together.

DrawExtra

public Action<List<GameObject>, RaptorSuiteContext> DrawExtra;

Optional. Draws extra rows for the body in the Inspector block, under the Collision line. Called when every selected entity has this body.

Enter

public Action<GameObject, string> Enter;

Switches an entity to this body, inside the switch's Undo group. The string is the group's name.

Help

public string Help;

The status line under the control while this body is selected.

Icon

public string Icon;

The segment's icon.

Label

public string Label;

The segment's label, for example "Moving".

Leave

public Action<GameObject, string> Leave;

Switches an entity out of this body, inside the switch's Undo group. The string is the group's name.

Order

public int Order;

The segment's position; smaller values come first. Built-in values: StaticOrder, DynamicOrder, MovingOrder, PhysicsOrder, BreakableOrder.

Unavailable

public string Unavailable;

Why the option cannot be chosen yet, or null when it can. When set, the option is shown disabled and cannot be chosen.

Properties

Available

public bool Available { get; }

Whether this option can be chosen now.