logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    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
    object
    AnimationHubAuthoringActions
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    Namespace: Serenity.Editor.AnimationHub.Window
    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
    Type Description
    AnimationHubAuthoringPromptState

    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
    Type Name Description
    string modelAssetPath
    AnimatorEntry animatorEntry

    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
    Type Name Description
    string controllerAssetPath
    int layerIndex
    string statePath
    string stateTitle

    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)

    Routes a clip or clip-driven-state row's "Edit Curves" action through AnimationHubClipEditorRegistry and logs which path it took. An embedded (read-only) clip still opens — the fallback Animation window can view it just fine — but the log calls out that editing it for real needs DuplicateEmbeddedClip(string, string) first.

    Declaration
    public void OpenClipEditor(string clipAssetPath, string clipSubAssetName, string modelAssetPath, bool clipIsEmbedded)
    Parameters
    Type Name Description
    string clipAssetPath
    string clipSubAssetName
    string modelAssetPath
    bool clipIsEmbedded

    OpenGenerateClipPrompt(string, string)

    Declaration
    public void OpenGenerateClipPrompt(string rowKey, string outputFolderPath)
    Parameters
    Type Name Description
    string rowKey
    string outputFolderPath

    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
    Type Name Description
    string stateRowKey
    string controllerAssetPath
    int layerIndex
    string statePath
    string currentName

    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()

    Call once per OnGUI. A no-op unless a clip picker opened by BeginAssignClip(string, int, string) just closed.

    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
    In this article
    © 2026 Serenity. All Rights Reserved