Class ConstantWeightProviderSO
Weight provider that always returns a fixed constant value. Useful for layers that should always be at full weight when their condition is met.
Inherited Members
Namespace: Serenity.ProceduralExpression.Infrastructure.WeightProviders
Assembly: Serenity.UnityProceduralExpression.Infrastructure.dll
Syntax
public class ConstantWeightProviderSO : WeightProviderSO
Constructors
ConstantWeightProviderSO()
Declaration
public ConstantWeightProviderSO()
Properties
Weight
Gets or sets the constant weight value.
Declaration
public float Weight { get; set; }
Property Value
| Type | Description |
|---|---|
| float |
Methods
GetWeight(in UnityProceduralContext)
Gets the weight value for the given procedural context. Returns a value typically between 0-1, but can exceed these bounds.
Declaration
public override float GetWeight(in UnityProceduralContext ctx)
Parameters
| Type | Name | Description |
|---|---|---|
| UnityProceduralContext | ctx | The current procedural context with state values. |
Returns
| Type | Description |
|---|---|
| float | The computed weight value. |