logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class ModelAnimatorCreatorTests

    EditMode tests for ModelAnimatorCreator. Every fixture (prefab, controller, clip) is built under a private temp folder and torn down after each test, mirroring GameSaveCreatorTests and ModelAnimationScannerTests. Every Input.RegisterAsAddressables is false so these tests never touch the project's real Addressables settings.

    Not covered: Validate rejecting an imported-model source. That branch needs a real UnityEditor.PrefabAssetType.Model asset (an actually-imported .fbx or equivalent), and this project ships no such fixture anywhere under Assets to build one from without adding a binary test asset.

    Inheritance
    object
    ModelAnimatorCreatorTests
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Serenity.AnimationHub.Tests.Editor
    Assembly: Tests.Editor.dll
    Syntax
    public class ModelAnimatorCreatorTests

    Constructors

    ModelAnimatorCreatorTests()

    Declaration
    public ModelAnimatorCreatorTests()

    Methods

    AddState_TwoStates_GetDistinctGridPositions()

    Declaration
    public void AddState_TwoStates_GetDistinctGridPositions()

    CreateControllerForModel_CreateSeedIdleStateTrue_SeedsADefaultIdleState()

    Declaration
    public void CreateControllerForModel_CreateSeedIdleStateTrue_SeedsADefaultIdleState()

    CreateControllerForModel_PlainPrefab_CreatesControllerAndWiresItOntoTheRoot()

    Declaration
    public void CreateControllerForModel_PlainPrefab_CreatesControllerAndWiresItOntoTheRoot()

    CreateControllerForModel_RegisterAsAddressablesFalse_LeavesAddressablesUntouched()

    Declaration
    public void CreateControllerForModel_RegisterAsAddressablesFalse_LeavesAddressablesUntouched()

    CreateControllerForModel_TargetAnimatorGameObjectPath_WiresTheChildInsteadOfTheRoot()

    Declaration
    public void CreateControllerForModel_TargetAnimatorGameObjectPath_WiresTheChildInsteadOfTheRoot()

    DeleteState_ExistingState_RemovesItAndItsOwnTransitionsAsSubAssets()

    Declaration
    public void DeleteState_ExistingState_RemovesItAndItsOwnTransitionsAsSubAssets()

    RenameState_ExistingState_ChangesItsName()

    Declaration
    public void RenameState_ExistingState_ChangesItsName()

    SetDefaultState_ExistingState_BecomesTheStateMachinesDefault()

    Declaration
    public void SetDefaultState_ExistingState_BecomesTheStateMachinesDefault()

    SetStateMotion_StandaloneClip_AssignsIt()

    Declaration
    public void SetStateMotion_StandaloneClip_AssignsIt()

    SetUp()

    Declaration
    public void SetUp()

    TearDown()

    Declaration
    public void TearDown()

    TransactionRollback_AfterFolderAndControllerCreated_RemovesBothWithNoOrphans()

    CreateControllerForModel screens every input error at Validate() time, before its transaction even begins — there is no black-box Input that reaches a genuine mid-transaction throw without a fragile filesystem trick (deleting/locking a file between Validate and Create). This instead proves the exact two-step recipe the creator runs inside its transaction (EnsureFolder, then Serenity.Global.Infrastructure.Editor.UnityAnimationAssetUtils.CreateController(System.String,System.Collections.Generic.ICollection{System.String}), both tracked) rolls back cleanly — the composition this creator actually depends on for its own rollback guarantee.

    Declaration
    public void TransactionRollback_AfterFolderAndControllerCreated_RemovesBothWithNoOrphans()

    Validate_MissingModelAssetPath_ReturnsError()

    Declaration
    public void Validate_MissingModelAssetPath_ReturnsError()

    Validate_ModelAssetPathDoesNotResolve_ReturnsError()

    Declaration
    public void Validate_ModelAssetPathDoesNotResolve_ReturnsError()

    Validate_TargetAnimatorPathDoesNotExistUnderTheModel_ReturnsError()

    Declaration
    public void Validate_TargetAnimatorPathDoesNotExistUnderTheModel_ReturnsError()
    In this article
    © 2026 Serenity. All Rights Reserved