Class ProceduralExpressionProfileSO
Centralized configuration asset that groups rules, layers, actions, and material targets.
Rules as Composition Root: The Rules array is the primary authored list. Layers and Actions are automatically derived from Rules at runtime. Legacy Layers/Actions arrays are deprecated and hidden, but kept for backward compatibility with existing assets.
Provides editor-only references for bone and material dropdown population.
Namespace: Serenity.ProceduralExpression.Infrastructure.Settings
Assembly: Serenity.UnityProceduralExpression.Infrastructure.dll
Syntax
public class ProceduralExpressionProfileSO : ScriptableObject
Constructors
ProceduralExpressionProfileSO()
Declaration
public ProceduralExpressionProfileSO()
Properties
Actions
Gets all effective procedural actions. Derived from Rules with TriggerAction effect.
Declaration
public IReadOnlyList<ProceduralActionSO> Actions { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<ProceduralActionSO> |
BaseLayers
Gets the optional base layers that are always active regardless of rules.
Declaration
public IReadOnlyList<ProceduralLayerSO> BaseLayers { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<ProceduralLayerSO> |
CollectedWeightProviders
Gets all weight providers used by rules. Useful for batch initialization or validation.
Declaration
public IReadOnlyList<WeightProviderSO> CollectedWeightProviders { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<WeightProviderSO> |
EditorRigReference
Editor-only reference to a rig definition for bone dropdown population. Returns null at runtime in builds.
Declaration
public UnityRigDefinition EditorRigReference { get; }
Property Value
| Type | Description |
|---|---|
| UnityRigDefinition |
Layers
Gets all effective procedural layers. Derived from BaseLayers and Rules with SetLayerWeight effect.
Declaration
public IReadOnlyList<ProceduralLayerSO> Layers { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<ProceduralLayerSO> |
MaterialTargets
Gets material targets for runtime registration and editor dropdown population.
Declaration
public IReadOnlyList<UnityMaterialTargetMapping> MaterialTargets { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<UnityMaterialTargetMapping> |
Rules
Gets the configured rules.
Declaration
public IReadOnlyList<RuleSO> Rules { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<RuleSO> |
TransformTargets
Gets transform targets for runtime registration and editor dropdown population.
Declaration
public IReadOnlyList<UnityTransformTargetMapping> TransformTargets { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<UnityTransformTargetMapping> |
Methods
GetEditorBoneIds()
Gets bone IDs from the editor rig reference for dropdown population. Returns empty list if no rig reference is set.
Declaration
public IReadOnlyList<string> GetEditorBoneIds()
Returns
| Type | Description |
|---|---|
| IReadOnlyList<string> |
GetEditorMaterialIds()
Gets material IDs from the configured targets for dropdown population. Returns empty list if no targets are configured.
Declaration
public IReadOnlyList<string> GetEditorMaterialIds()
Returns
| Type | Description |
|---|---|
| IReadOnlyList<string> |
GetEditorTransformIds()
Gets transform IDs from the configured targets for dropdown population. Returns empty list if no targets are configured.
Declaration
public IReadOnlyList<string> GetEditorTransformIds()
Returns
| Type | Description |
|---|---|
| IReadOnlyList<string> |
TryGetMaterialTarget(string, out UnityMaterialTargetMapping)
Gets a material target mapping by ID.
Declaration
public bool TryGetMaterialTarget(string materialId, out UnityMaterialTargetMapping mapping)
Parameters
| Type | Name | Description |
|---|---|---|
| string | materialId | The material ID to find. |
| UnityMaterialTargetMapping | mapping | The found mapping, or default if not found. |
Returns
| Type | Description |
|---|---|
| bool | True if found, false otherwise. |
TryGetTransformTarget(string, out UnityTransformTargetMapping)
Gets a transform target mapping by ID.
Declaration
public bool TryGetTransformTarget(string transformId, out UnityTransformTargetMapping mapping)
Parameters
| Type | Name | Description |
|---|---|---|
| string | transformId | The transform ID to find. |
| UnityTransformTargetMapping | mapping | The found mapping, or default if not found. |
Returns
| Type | Description |
|---|---|
| bool | True if found, false otherwise. |
ValidateConfiguration()
Validates the profile configuration and returns any issues found. Validates rules as the composition root and checks all derived targets.
Declaration
public List<string> ValidateConfiguration()
Returns
| Type | Description |
|---|---|
| List<string> |