Get RAPTOR

RaptorRtPostToggles.ElementProvider

Defines what an optional post element switches off.

NamespaceAssemblyKindStability
Raptor.Render.EditorToolsRaptorRender.Editorclasspreview, since 0.1.0

Create with Feature or Volume.

public sealed class ElementProvider

Properties

Element

public Element Element { get; }

The element this provider supplies.

IsFeature

public bool IsFeature { get; }

True for a feature element, false for a volume element.

MatchesFeature

public Func<ScriptableRendererFeature, bool> MatchesFeature { get; }

For a feature element, returns true for the renderer feature this element switches. Null for a volume element.

SwitchOff

public Action<VolumeComponent> SwitchOff { get; }

For a volume element, writes the off override into the profile's component.

VolumeType

public Type VolumeType { get; }

For a volume element, the VolumeComponent type added to the override profile. Null for a feature element.

Methods

Feature

public static ElementProvider Feature(Element element, Func<ScriptableRendererFeature, bool> matchesFeature)

Creates a renderer-feature element. A matching feature that is inactive still counts as present.

ParameterTypeDescription
elementElementThe element.
matchesFeatureFunc<ScriptableRendererFeature, bool>Returns true for the renderer feature that represents the element.

Returns: The provider.

Volume

public static ElementProvider Volume(Element element, Type volumeComponent, Action<VolumeComponent> switchOff)

Creates a volume element. switchOff receives the profile's volumeComponent.

ParameterTypeDescription
elementElementThe element.
volumeComponentTypeThe volume component's type.
switchOffAction<VolumeComponent>Switches the component off in a profile.

Returns: The provider.