logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class ProceduralLayerSO

    Base ScriptableObject for continuous procedural animation layers. Layers are evaluated every frame and contribute weighted offsets to the final pose and/or material properties. Examples: breathing, sway, tremor, arm hang, head twitch, color pulsing.

    Inheritance
    object
    ProceduralLayerSO
    HighFrequencyNoiseLayerSO
    MaterialColorSequenceLayerSO
    PeriodicOscillationLayerSO
    PerlinDriftLayerSO
    RandomImpulseLayerSO
    StateModulatedOffsetLayerSO
    TransformScaleSequenceLayerSO
    Namespace: Serenity.ProceduralExpression.Infrastructure.ProceduralLayers
    Assembly: Serenity.UnityProceduralExpression.Infrastructure.dll
    Syntax
    public abstract class ProceduralLayerSO : ScriptableObject

    Constructors

    ProceduralLayerSO()

    Declaration
    protected ProceduralLayerSO()

    Fields

    displayName

    Declaration
    protected string displayName
    Field Value
    Type Description
    string

    Properties

    DisplayName

    Gets the display name for this layer.

    Declaration
    public string DisplayName { get; }
    Property Value
    Type Description
    string

    Methods

    Evaluate(in UnityProceduralContext, float, ref PoseDelta)

    Evaluates this layer and adds its contribution to the pose delta. Called every frame for all active layers.

    Declaration
    public abstract void Evaluate(in UnityProceduralContext ctx, float weight, ref PoseDelta pose)
    Parameters
    Type Name Description
    UnityProceduralContext ctx

    The procedural context containing state and time information.

    float weight

    The weight of this layer (0-1). Used for blending.

    PoseDelta pose

    The pose delta to add contributions to.

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

    Evaluates this layer and adds its contribution to both pose and material deltas. Called every frame for all active layers. Override this method for layers that need to affect material properties. Default implementation calls the pose-only Evaluate method for backward compatibility.

    Declaration
    public virtual void Evaluate(in UnityProceduralContext ctx, float weight, ref PoseDelta pose, ref MaterialDelta material)
    Parameters
    Type Name Description
    UnityProceduralContext ctx

    The procedural context containing state and time information.

    float weight

    The weight of this layer (0-1). Used for blending.

    PoseDelta pose

    The pose delta to add contributions to.

    MaterialDelta material

    The material delta to add contributions to.

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

    Evaluates this layer and adds its contribution to pose, material, and transform deltas. Called every frame for all active layers. Override this method for layers that need to affect transform properties (scale). Default implementation calls the pose+material Evaluate method for backward compatibility.

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

    The procedural context containing state and time information.

    float weight

    The weight of this layer (0-1). Used for blending.

    PoseDelta pose

    The pose delta to add contributions to.

    MaterialDelta material

    The material delta to add contributions to.

    TransformDelta transform

    The transform delta to add contributions to.

    OnLayerActivated()

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

    Declaration
    public virtual void OnLayerActivated()

    OnLayerDeactivated()

    Optional cleanup called when the layer becomes inactive. Override to clean up any runtime state.

    Declaration
    public virtual void OnLayerDeactivated()
    In this article
    © 2026 Serenity. All Rights Reserved