Class AnimationHubAuthoringActions
The Animation Hub window's authoring controller: turns a row action press into a
ModelAnimatorCreator call, logs the outcome to the window's
Serenity.Global.Infrastructure.Editor.SerenityWizardActivityLog, and triggers a rescan so the tree reflects the change. Owns
the transient row-level UI state authoring needs — the inline Add-State/Rename prompt, and the pending
UnityEditor.EditorGUIUtility.ShowObjectPicker``1(UnityEngine.Object,System.Boolean,System.String,System.Int32) clip request — so AnimationHubUnityTabGui
stays pure rendering and AnimationHubWindow stays a thin host. Recreated (not serialized)
every OnEnable, the same lifetime as the window's _expandedRowKeys set.
Inheritance
AnimationHubAuthoringActions
Assembly: Serenity.AnimationHub.Editor.dll
Syntax
public sealed class AnimationHubAuthoringActions
Constructors
AnimationHubAuthoringActions(SerenityWizardActivityLog, Action, Action<string>)
Declaration
public AnimationHubAuthoringActions(SerenityWizardActivityLog activityLog, Action rescanAndRepaint, Action<string> retargetToModelAssetPath)
Parameters
| Type |
Name |
Description |
| SerenityWizardActivityLog |
activityLog |
Where every action's outcome is logged.
|
| Action |
rescanAndRepaint |
Runs after a mutation the window's own model stays pointed at.
|
| Action<string> |
retargetToModelAssetPath |
Runs after CreatePrefabVariant(string) succeeds, with the
new variant's asset path — the window re-points itself at it instead of the now-superseded read-only
source, which also triggers its own rescan.
|
Properties
Prompt
The Add-State/Rename inline prompt's current state, read by AnimationHubUnityTabGui to decide which row (if any) renders it.
Declaration
public AnimationHubAuthoringPromptState Prompt { get; }
Property Value
Methods
BeginAssignClip(string, int, string)
Declaration
public void BeginAssignClip(string controllerAssetPath, int layerIndex, string statePath)
Parameters
| Type |
Name |
Description |
| string |
controllerAssetPath |
|
| int |
layerIndex |
|
| string |
statePath |
|
CancelPrompt()
Declaration
public void CancelPrompt()
ConfirmAddParameter()
Declaration
public void ConfirmAddParameter()
ConfirmAddState()
Declaration
public void ConfirmAddState()
ConfirmAddTransition()
Declaration
public void ConfirmAddTransition()
ConfirmGenerateClip()
Declaration
public void ConfirmGenerateClip()
ConfirmRenameParameter()
Declaration
public void ConfirmRenameParameter()
ConfirmRenameState()
Declaration
public void ConfirmRenameState()
ConfirmSetLayerWeight()
Declaration
public void ConfirmSetLayerWeight()
CreateController(string, AnimatorEntry)
Declaration
public void CreateController(string modelAssetPath, AnimatorEntry animatorEntry)
Parameters
CreatePrefabVariant(string)
The read-only imported model's unblocking affordance: creates a prefab variant and — on
success — re-points the window at it instead of logging-and-rescanning in place, since the window's
own model field is now stale.
Declaration
public void CreatePrefabVariant(string importedModelPath)
Parameters
| Type |
Name |
Description |
| string |
importedModelPath |
|
DeleteParameter(string, string)
Declaration
public void DeleteParameter(string controllerAssetPath, string parameterName)
Parameters
| Type |
Name |
Description |
| string |
controllerAssetPath |
|
| string |
parameterName |
|
DeleteState(string, int, string, string)
Declaration
public void DeleteState(string controllerAssetPath, int layerIndex, string statePath, string stateTitle)
Parameters
DeleteTransition(string, int, string, string, int, string)
Declaration
public void DeleteTransition(string controllerAssetPath, int layerIndex, string sourceStatePath, string destinationStatePath, int matchIndex, string transitionTitle)
Parameters
| Type |
Name |
Description |
| string |
controllerAssetPath |
|
| int |
layerIndex |
|
| string |
sourceStatePath |
|
| string |
destinationStatePath |
|
| int |
matchIndex |
|
| string |
transitionTitle |
|
DuplicateEmbeddedClip(string, string)
Copies an embedded clip row's clip out to an editable standalone .anim asset, with every
other ModelClipCreator.Input field left at its default (destination folder and asset
name both derived from the source model and clip).
Declaration
public void DuplicateEmbeddedClip(string sourceModelPath, string sourceClipName)
Parameters
| Type |
Name |
Description |
| string |
sourceModelPath |
|
| string |
sourceClipName |
|
OpenAddParameterPrompt(string, string)
Declaration
public void OpenAddParameterPrompt(string groupRowKey, string controllerAssetPath)
Parameters
| Type |
Name |
Description |
| string |
groupRowKey |
|
| string |
controllerAssetPath |
|
OpenAddStatePrompt(string, string, int)
Declaration
public void OpenAddStatePrompt(string layerRowKey, string controllerAssetPath, int layerIndex)
Parameters
| Type |
Name |
Description |
| string |
layerRowKey |
|
| string |
controllerAssetPath |
|
| int |
layerIndex |
|
OpenAddTransitionPrompt(string, string, int, string, string, string)
Declaration
public void OpenAddTransitionPrompt(string transitionPromptRowKey, string controllerAssetPath, int layerIndex, string defaultSourceStatePath, string defaultDestinationStatePath, string defaultConditionParameterName)
Parameters
| Type |
Name |
Description |
| string |
transitionPromptRowKey |
|
| string |
controllerAssetPath |
|
| int |
layerIndex |
|
| string |
defaultSourceStatePath |
|
| string |
defaultDestinationStatePath |
|
| string |
defaultConditionParameterName |
|
OpenClipEditor(string, string, string, bool)
Declaration
public void OpenClipEditor(string clipAssetPath, string clipSubAssetName, string modelAssetPath, bool clipIsEmbedded)
Parameters
OpenGenerateClipPrompt(string, string)
Declaration
public void OpenGenerateClipPrompt(string rowKey, string outputFolderPath)
Parameters
OpenRenameParameterPrompt(string, string, string)
Declaration
public void OpenRenameParameterPrompt(string parameterRowKey, string controllerAssetPath, string parameterName)
Parameters
| Type |
Name |
Description |
| string |
parameterRowKey |
|
| string |
controllerAssetPath |
|
| string |
parameterName |
|
OpenRenamePrompt(string, string, int, string, string)
Declaration
public void OpenRenamePrompt(string stateRowKey, string controllerAssetPath, int layerIndex, string statePath, string currentName)
Parameters
OpenSetLayerWeightPrompt(string, string, int, float)
Declaration
public void OpenSetLayerWeightPrompt(string weightPromptRowKey, string controllerAssetPath, int layerIndex, float currentWeight)
Parameters
| Type |
Name |
Description |
| string |
weightPromptRowKey |
|
| string |
controllerAssetPath |
|
| int |
layerIndex |
|
| float |
currentWeight |
|
ProcessPendingClipPicker()
Declaration
public void ProcessPendingClipPicker()
SetDefaultState(string, int, string)
Declaration
public void SetDefaultState(string controllerAssetPath, int layerIndex, string statePath)
Parameters
| Type |
Name |
Description |
| string |
controllerAssetPath |
|
| int |
layerIndex |
|
| string |
statePath |
|