Class ProceduralLayerFacets
Single source of truth for facet-level questions about a ProceduralLayerSO — finer-grained than DrivenChannels's channel mask, which only tells "Transform" (scale, rotation OR position all set that one flag).
Inherited Members
Namespace: Serenity.ProceduralAnimator.Infrastructure.ProceduralLayers
Assembly: Serenity.UnityProceduralAnimator.Infrastructure.dll
Syntax
public static class ProceduralLayerFacets
Remarks
Facet ≠ channel: a channel mask gates the HUD-compatibility gallery scan and the "no effect" warning (both
editor-only — see ProceduralLayerHudCompatibility.AppliedChannelMask). It does NOT gate applier
target registration, which is unconditional per element regardless of channel (see
UnityHudHostComponent.BuildAnimator's own remarks). A facet check instead answers a narrower,
layout-specific compatibility question a channel mask alone cannot: position specifically is layout-hostile
for a FLEXBOX-parented HUD element (see TransformDelta.SetLocalPositionOffset's own remarks and
UnityTransformApplier's AllowPosition gate), while scale and rotation are not.
Lives in this runtime assembly, not the editor-only one, because both consumers need it: the editor-only
ProceduralLayerHudCompatibility.WritesPositionFacet (the inline row warning and the project-wide
validator) AND the runtime UnityHudHostComponent.WarnParentedPositionLayerOnce — HUD builds happen
in Play mode too, not only in the editor's HUD builder. Previously two independent, hand-synced type
checks that had to be kept in sync by hand; extracted here so the two call sites can never drift apart.
Methods
WritesPositionFacet(ProceduralLayerSO)
Whether layer writes the transform delta's POSITION facet specifically. A direct
type check is deliberate and sufficient here (unlike a driven-channels read, which needs a throwaway
instance): today exactly one layer type (TransformPositionSequenceLayerSO) writes this
facet, and nothing about the check needs an instance.
Declaration
public static bool WritesPositionFacet(ProceduralLayerSO layer)
Parameters
| Type | Name | Description |
|---|---|---|
| ProceduralLayerSO | layer | The layer to check; null returns false (nothing to warn about). |
Returns
| Type | Description |
|---|---|
| bool |