logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class GaitCycleLayerSO

    Stateless procedural layer that drives a walking gait cycle: reads a normalized, wrapping phase state key and writes per-bone leg/arm/hip rotation offsets (plus a hip vertical bob) via the pure GaitCycleSolver.

    Mechanism: every bone offset is a deterministic function of the current phase — there is no per-instance runtime state on this asset (it is shared across every enemy instance), so the only "memory" of where an enemy is in its stride lives in the phase state key itself, written by the controller (EnemyBehaviorController's distance accumulator).

    Common applications: humanoid walk/run cycles driven by real traversed distance rather than elapsed time, so stride speed always matches locomotion speed.

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

    Constructors

    GaitCycleLayerSO()

    Declaration
    public GaitCycleLayerSO()

    Properties

    DrivenChannels

    Writes only Pose — the only Evaluate overload this layer overrides.

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

    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 override 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.

    Overrides
    ProceduralLayerSO.Evaluate(in UnityProceduralContext, float, ref PoseDelta)

    Implements

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