logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class GraphicColorSequenceLayerSO

    Procedural layer that animates through a sequence of UGUI Graphic tint steps. Applies tint changes via UiColorDelta for per-instance HUD fade/flash/tint animation, applied by UnityGraphicColorApplier.

    Common applications: a fade-in entrance, a damage/heal flash, an ambient "still alive" alpha pulse.

    Inheritance
    object
    ProceduralLayerSO
    GraphicColorSequenceLayerSO
    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)
    ProceduralLayerSO.Evaluate(in UnityProceduralContext, float, ref PoseDelta, ref MaterialDelta, ref TransformDelta, ref ActivationDelta)
    ProceduralLayerSO.OnLayerDeactivated()
    ProceduralLayerSO.DisplayName
    ProceduralLayerSO.PhaseMode
    ProceduralLayerSO.RepeatCount
    Namespace: Serenity.ProceduralAnimator.Infrastructure.ProceduralLayers
    Assembly: Serenity.UnityProceduralAnimator.Infrastructure.dll
    Syntax
    public class GraphicColorSequenceLayerSO : ProceduralLayerSO, IProceduralLayer<UnityProceduralContext>, IFoundationSettings
    Remarks

    Weight is deliberately NOT pre-blended here, unlike the transform-facet sequence layers. TransformRotationSequenceLayerSO/TransformPositionSequenceLayerSO blend their own resolved value toward identity (0°, Vector3.zero) by effectiveWeight before writing the entry, because each facet's identity is known without consulting the target. A Graphic's identity tint is its own live BASE COLOR — unknown here, only known to UnityGraphicColorApplier, which holds the registered Graphic — so this layer writes the raw resolved tint and its weight verbatim, and the applier performs Color.Lerp(Base, Base * Tint, Weight) itself. This mirrors MaterialColorSequenceLayerSO's own material.SetColor(id, colorRGBA, effectiveWeight) call, which defers the same way to UnityMaterialApplier for the identical reason. See Weight's own remarks for the full rationale.

    Constructors

    GraphicColorSequenceLayerSO()

    Declaration
    public GraphicColorSequenceLayerSO()

    Properties

    DrivenChannels

    Writes only UiColor — see the 6-delta Evaluate(in UnityProceduralContext, float, ref PoseDelta, ref MaterialDelta, ref TransformDelta, ref ActivationDelta, ref UiColorDelta) 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 UiColor 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, ref ActivationDelta, ref UiColorDelta)

    Evaluates the tint sequence and adds the current tint to the UiColor delta. See this class's own remarks for why the weight is written verbatim rather than pre-blended toward identity here.

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

    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