Namespace Serenity.Editor.AnimationHub.Authoring
Classes
ModelAnimatorCreator
Creates (or wires) an UnityEditor.Animations.AnimatorController for a model prefab, and edits the states of an
already-created one. Mirrors Serenity.GameSave.Infrastructure.Editor.Builder.GameSaveCreator's
shape for the one-time controller creation (Input/SerenityCreationValidationResult/Result DTOs,
Serenity.Global.Infrastructure.Editor.SerenityAssetCreationTransaction rollback-on-failure). The per-state edits below it
(AddState(string, int, string), RenameState(string, int, string, string), DeleteState(string, int, string), SetDefaultState(string, int, string),
SetStateMotion(string, int, string, string, string)) target an EXISTING controller asset and are never routed through that
transaction — a creation-transaction rollback deletes the assets IT created, and this controller was
not one of them; each edit instead follows the plain Unity idiom
(UnityEditor.Undo.RegisterCompleteObjectUndo(UnityEngine.Object,System.String) → mutate → UnityEditor.EditorUtility.SetDirty(UnityEngine.Object) +
UnityEditor.AssetDatabase.SaveAssets).
ModelAnimatorCreator.Input
Everything needed to create or wire an UnityEditor.Animations.AnimatorController for one model.
ModelAnimatorCreator.Result
Outcome of CreateControllerForModel(Input).
ModelAnimatorCreator.StateOperationResult
Outcome of a state-level edit against an already-existing controller.
ModelAnimatorParameterCreator
Adds, renames and deletes UnityEditor.Animations.AnimatorController parameters against an already-created controller asset. Split out of ModelAnimatorCreator once state ops plus parameter and transition ops would have pushed that file well past its ~600-line size guidance — parameters are their own authoring surface (controller-wide, not layer/state-scoped) with a DRY concern of their own: a rename or a delete both need to walk every transition condition across every layer and sub-state-machine looking for the parameter, so that walk lives here once instead of twice. Reuses ModelAnimatorCreator.StateOperationResult and its controller-load/undo/save plumbing (Serenity.Editor.AnimationHub.Authoring.ModelAnimatorCreator.ExecuteControllerOperation(System.String,System.String,System.Func{UnityEditor.Animations.AnimatorController,System.String})) rather than duplicating a sibling DTO.
ModelAnimatorTransitionCreator
Adds and removes transitions on an already-created UnityEditor.Animations.AnimatorController, and sets a layer's default weight. Split out of ModelAnimatorCreator for the same size-guidance reason as ModelAnimatorParameterCreator — a transition is its own authoring surface (it can start from AnyState instead of a state, and needs its own exit-time default policy) rather than another state-shaped edit; the layer-weight setter rides along here since it shares this file's layer-index resolution and has no state/transition shape of its own to justify a fourth file.
ModelClipCreator
Three independent clip-authoring operations, sharing one ModelClipCreator.Input/Serenity.Global.Infrastructure.Editor.SerenityCreationValidationResult/ ModelClipCreator.Result triple the same way ModelAnimatorCreator shares its own set: GenerateClip(Input) builds a small procedural clip from one of the ModelClipCreator.ClipPreset shapes (a from-scratch alternative for a model with no usable animation data at all), DuplicateEmbeddedClip(Input) copies an FBX-embedded clip out to an editable standalone .anim asset, and CreatePrefabVariant(Input) is the unblocking affordance for a read-only imported model — it creates a prefab variant the rest of this window's authoring tools (ModelAnimatorCreator and friends) can then write to. Every mutating operation runs inside a Serenity.Global.Infrastructure.Editor.SerenityAssetCreationTransaction, rolling back to a clean project on any failure — the same idiom CreateControllerForModel(Input) uses.
ModelClipCreator.Input
Everything any of this type's three operations need. Each operation reads only the fields its own doc comment lists — the rest sit unused, the same reuse-one-DTO shape ModelAnimatorCreator.StateOperationResult already applies across three sibling creators.
ModelClipCreator.Result
Outcome of any of this type's three operations — each populates only its own asset-path field.
Structs
ModelAnimatorTransitionCreator.TransitionCondition
An optional condition to seed a new transition with — a parameter name, comparison mode and threshold, the same triple AnimatorStateTransition.AddCondition takes.
Enums
ModelClipCreator.ClipPreset
A small transform-curve shape GenerateClip(Input) can build without any source clip. Amplitude means something different per preset — see each member.