Get RAPTOR

RaptorMesh

A RAPTOR Mesh Block.

NamespaceAssemblyKindStability
Raptor.ComponentsRaptor.Componentsclasspreview, since 0.1.0

Only the per-Block modifier data members are supported API.

public sealed class RaptorMesh : MonoBehaviour, ISerializationCallbackReceiver

Properties

Modifiers

public IReadOnlyList<RaptorBlockModifierData> Modifiers { get; }

The modifier data entries on this Block. The list is never null; an entry is null when its type is missing. Add and remove entries with GetOrAddModifier{T} and RemoveModifier{T}.

Methods

GetModifier

public T GetModifier<T>() where T : RaptorBlockModifierData

Returns the first entry of type T, or null if there is none. Skips null entries and does not allocate.

Returns: The entry, or null.

GetOrAddModifier

public T GetOrAddModifier<T>() where T : RaptorBlockModifierData, new()

Returns the entry of type T, adding one with default values if there is none. Null entries are kept and not reused. The editor records Undo around the call. Not for game code.

Returns: The entry. Never null.

RemoveModifier

public bool RemoveModifier<T>() where T : RaptorBlockModifierData

Removes every entry of type T. Null entries are kept. The editor records Undo around the call. Not for game code.

Returns: True if an entry was removed.