logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class TransformPositionSequenceLayerSO

    Procedural layer that animates through a sequence of local-position-offset steps. Applies position changes via TransformDelta for per-instance animation.

    Common applications: a slide-in entrance, a shake/nudge reaction, anything that needs to actually move rather than scale or spin.

    Inheritance
    object
    ProceduralLayerSO
    TransformPositionSequenceLayerSO
    Implements
    IProceduralLayer<UnityProceduralContext>
    IFoundationSettings
    Inherited Members
    ProceduralLayerSO.Id
    ProceduralLayerSO.Guid
    ProceduralLayerSO.displayName
    ProceduralLayerSO.phaseMode
    ProceduralLayerSO.repeatCount
    ProceduralLayerSO.Evaluate(in UnityProceduralContext, float, ref PoseDelta, ref MaterialDelta)
    ProceduralLayerSO.Evaluate(in UnityProceduralContext, float, ref PoseDelta, ref MaterialDelta, ref TransformDelta, ref ActivationDelta)
    ProceduralLayerSO.Evaluate(in UnityProceduralContext, float, ref PoseDelta, ref MaterialDelta, ref TransformDelta, ref ActivationDelta, ref UiColorDelta)
    ProceduralLayerSO.OnLayerDeactivated()
    ProceduralLayerSO.DisplayName
    ProceduralLayerSO.PhaseMode
    ProceduralLayerSO.RepeatCount
    Namespace: Serenity.ProceduralAnimator.Infrastructure.ProceduralLayers
    Assembly: Serenity.UnityProceduralAnimator.Infrastructure.dll
    Syntax
    public class TransformPositionSequenceLayerSO : ProceduralLayerSO, IProceduralLayer<UnityProceduralContext>, IFoundationSettings
    Remarks

    Root-level HUD elements only. Position animation is layout-hostile for a FLEXBOX-parented HUD element: UGUI's layout rebuild runs after the animator tick and overwrites whatever local position this layer wrote. UnityHudHostComponent.BuildAnimator only registers a target with allowPositionOverride: true (see UnityTransformApplier's AllowPosition gate) for a root-level element (no ParentId) — author this layer's transformId at a root-level element, or its writes are silently dropped by the applier. See ProceduralLayerHudCompatibility.WritesPositionFacet/BuildParentedPositionMessage for the editor-side warning that catches this mistake at authoring time.

    Unlike TransformRotationSequenceLayerSO's wrap-seam angle unwrap, position has no equivalent special case: UnityEngine.Vector3.Lerp(UnityEngine.Vector3,UnityEngine.Vector3,System.Single) has no angular wraparound ambiguity, so blending the last step back into the first (when the sequence cycles) is a plain lerp — the same cycles-gated hold-last-step shape TransformScaleSequenceLayerSO uses for its own step resolution, with no wrap-unwrap on top.

    Constructors

    TransformPositionSequenceLayerSO()

    Declaration
    public TransformPositionSequenceLayerSO()

    Properties

    DrivenChannels

    Writes only Transform — see the 3-delta Evaluate(in UnityProceduralContext, float, ref PoseDelta, ref MaterialDelta, ref TransformDelta) override below.

    Declaration
    public override ProceduralChannels DrivenChannels { get; }
    Property Value
    Type Description
    ProceduralChannels
    Overrides
    ProceduralLayerSO.DrivenChannels

    SequenceDurationSeconds

    The sum of all step durations — one full pass through the sequence. Used together with RepeatCount in ON_ACTIVATE mode to know when the sequence has repeated enough times to auto-deactivate.

    Declaration
    public override float SequenceDurationSeconds { get; }
    Property Value
    Type Description
    float
    Overrides
    ProceduralLayerSO.SequenceDurationSeconds

    Methods

    Evaluate(in UnityProceduralContext, float, ref PoseDelta)

    Legacy pose-only evaluation. Does nothing for transform layers.

    Declaration
    public override void Evaluate(in UnityProceduralContext ctx, float weight, ref PoseDelta pose)
    Parameters
    Type Name Description
    UnityProceduralContext ctx
    float weight
    PoseDelta pose
    Overrides
    ProceduralLayerSO.Evaluate(in UnityProceduralContext, float, ref PoseDelta)

    Evaluate(in UnityProceduralContext, float, ref PoseDelta, ref MaterialDelta, ref TransformDelta)

    Evaluates the position sequence and adds the current local position offset to the transform delta.

    Declaration
    public override void Evaluate(in UnityProceduralContext ctx, float weight, ref PoseDelta pose, ref MaterialDelta material, ref TransformDelta transform)
    Parameters
    Type Name Description
    UnityProceduralContext ctx
    float weight
    PoseDelta pose
    MaterialDelta material
    TransformDelta transform
    Overrides
    ProceduralLayerSO.Evaluate(in UnityProceduralContext, float, ref PoseDelta, ref MaterialDelta, ref TransformDelta)

    OnLayerActivated()

    Optional initialization called when the layer becomes active. Override to set up any required runtime state.

    Declaration
    public override void OnLayerActivated()
    Overrides
    ProceduralLayerSO.OnLayerActivated()

    Implements

    IProceduralLayer<TContext>
    IFoundationSettings
    In this article
    © 2026 Serenity. All Rights Reserved