Class ProceduralAnimatorSetupOrchestrator
Engine class for ProceduralAnimatorSetupWindow: prefab/rig resolution and
transform-path validation, extracted so the window only collects input, draws GUI, and calls here.
Mirrors the *Creator pattern used by the other wizards (Feedback/GameSettings/Cutscene) —
logging is reported through callbacks so the exact message text/order the window already showed is
preserved without this class depending on UnityEditor.EditorWindow.
Inherited Members
Namespace: Serenity.ProceduralAnimator.Infrastructure.Editor
Assembly: Serenity.UnityProceduralAnimator.Infrastructure.Editor.dll
Syntax
public static class ProceduralAnimatorSetupOrchestrator
Fields
RootTransformPath
Special path constant representing the root transform of a prefab.
Declaration
public const string RootTransformPath = "(Root)"
Field Value
| Type | Description |
|---|---|
| string |
Methods
GetPrefabTransformPaths(GameObject)
Gets all transform paths from targetPrefab for the transform picker dropdown.
Always includes the root transform first, then all children in alphabetical order.
Declaration
public static List<string> GetPrefabTransformPaths(GameObject targetPrefab)
Parameters
| Type | Name | Description |
|---|---|---|
| GameObject | targetPrefab |
Returns
| Type | Description |
|---|---|
| List<string> |
GetTransformPath(Transform, Transform)
Returns the relative slash-separated path from root down to t.
Declaration
public static string GetTransformPath(Transform t, Transform root)
Parameters
| Type | Name | Description |
|---|---|---|
| Transform | t | |
| Transform | root |
Returns
| Type | Description |
|---|---|
| string |
IsTransformPathValidInPrefab(GameObject, string)
Validates that a transform path exists in targetPrefab.
Handles the special "(Root)" path which always exists.
Declaration
public static bool IsTransformPathValidInPrefab(GameObject targetPrefab, string transformPath)
Parameters
| Type | Name | Description |
|---|---|---|
| GameObject | targetPrefab | |
| string | transformPath |
Returns
| Type | Description |
|---|---|
| bool |
ResolveSourcePrefabAsset(GameObject, out GameObject, out string, Action<string>)
Resolves a GameObject to its source prefab asset and asset path. Handles prefab assets, scene instances, prefab variants, and nested prefabs.
Declaration
public static bool ResolveSourcePrefabAsset(GameObject input, out GameObject prefabAsset, out string assetPath, Action<string> logError = null)
Parameters
| Type | Name | Description |
|---|---|---|
| GameObject | input | The GameObject to resolve. |
| GameObject | prefabAsset | The resolved prefab asset. |
| string | assetPath | The asset path of the prefab. |
| Action<string> | logError | Callback invoked with a human-readable error when resolution fails. |
Returns
| Type | Description |
|---|---|
| bool | True if resolution succeeded. |
TryGetRigDefinitionFromPrefab(string, out UnityRigDefinition, Action<string>, Action<string>, Action<string>)
Attempts to retrieve the UnityRigDefinition from a prefab asset. Reports detailed diagnostics through the log callbacks if retrieval fails.
Declaration
public static bool TryGetRigDefinitionFromPrefab(string assetPath, out UnityRigDefinition rigDef, Action<string> logInfo = null, Action<string> logWarning = null, Action<string> logError = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | assetPath | The asset path of the prefab. |
| UnityRigDefinition | rigDef | The retrieved rig definition, or null if not found. |
| Action<string> | logInfo | Callback for informational messages (e.g. bone count on success). |
| Action<string> | logWarning | Callback for diagnostic warnings when no rig definition is found. |
| Action<string> | logError | Callback for hard failures (missing path, failed prefab load). |
Returns
| Type | Description |
|---|---|
| bool | True if the rig definition was found. |
ValidateAndGetTransformPath(GameObject, Transform)
Validates that a Transform belongs to targetPrefab's hierarchy.
Returns the relative path if valid, null otherwise.
Declaration
public static string ValidateAndGetTransformPath(GameObject targetPrefab, Transform t)
Parameters
| Type | Name | Description |
|---|---|---|
| GameObject | targetPrefab | |
| Transform | t |
Returns
| Type | Description |
|---|---|
| string |