logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Struct UnityProceduralContext

    Unity-specific procedural context passed to all layers and actions. Provides convenient access to state values via UnityStateKey references.

    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetType()
    Namespace: Serenity.ProceduralExpression.Infrastructure.Settings
    Assembly: Serenity.UnityProceduralExpression.Infrastructure.dll
    Syntax
    public readonly struct UnityProceduralContext

    Constructors

    UnityProceduralContext(IStateReader, float, float)

    Creates a new UnityProceduralContext.

    Declaration
    public UnityProceduralContext(IStateReader stateReader, float time, float deltaTime)
    Parameters
    Type Name Description
    IStateReader stateReader
    float time
    float deltaTime

    Fields

    DeltaTime

    Delta time in seconds.

    Declaration
    public readonly float DeltaTime
    Field Value
    Type Description
    float

    StateReader

    Reader for accessing state values from the state bus.

    Declaration
    public readonly IStateReader StateReader
    Field Value
    Type Description
    IStateReader

    Time

    Current time in seconds.

    Declaration
    public readonly float Time
    Field Value
    Type Description
    float

    Methods

    GetState(StateKeyId, float)

    Gets a state value by StateKeyId with optional default.

    Declaration
    public float GetState(StateKeyId key, float defaultValue = 0)
    Parameters
    Type Name Description
    StateKeyId key
    float defaultValue
    Returns
    Type Description
    float

    GetState(UnityStateKey, float)

    Gets a state value by UnityStateKey with optional default.

    Declaration
    public float GetState(UnityStateKey key, float defaultValue = 0)
    Parameters
    Type Name Description
    UnityStateKey key
    float defaultValue
    Returns
    Type Description
    float

    ToDomainContext()

    Converts to domain ProceduralContext.

    Declaration
    public ProceduralContext ToDomainContext()
    Returns
    Type Description
    ProceduralContext
    In this article
    © 2026 Serenity. All Rights Reserved