Struct UnityProceduralContext
Unity-specific procedural context passed to all layers and actions.
Provides convenient access to state values via UnityStateKey references.
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
Fields
DeltaTime
Declaration
public readonly float DeltaTime
Field Value
StateReader
Reader for accessing state values from the state bus.
Declaration
public readonly IStateReader StateReader
Field Value
Time
Declaration
public readonly float Time
Field Value
Methods
GetState(StateKeyId, float)
Gets a state value by StateKeyId with optional default.
Declaration
public float GetState(StateKeyId key, float defaultValue = 0)
Parameters
Returns
GetState(UnityStateKey, float)
Gets a state value by UnityStateKey with optional default.
Declaration
public float GetState(UnityStateKey key, float defaultValue = 0)
Parameters
Returns
ToDomainContext()
Converts to domain ProceduralContext.
Declaration
public ProceduralContext ToDomainContext()
Returns