diff --git a/Assets/Scripts/OpenTS2/Engine/Tests/SimAnimationTest.cs b/Assets/Scripts/OpenTS2/Engine/Tests/SimAnimationTest.cs index f5923fcb..6c0019b1 100644 --- a/Assets/Scripts/OpenTS2/Engine/Tests/SimAnimationTest.cs +++ b/Assets/Scripts/OpenTS2/Engine/Tests/SimAnimationTest.cs @@ -45,7 +45,7 @@ private void Start() continue; } - _animations[animationAsset.AnimResource.ScenegraphResource.ResourceName] = animationAsset; + _animations[animationAsset.AnimResource.ScenegraphResource.ResourceName.ToLowerInvariant()] = animationAsset; } UpdateAnimationsListAndGetSelection(); @@ -121,6 +121,7 @@ private void OnValidate() _animationObj.AddClip(clip, animName); } + _animationObj.Play(animName); StartCoroutine(PlayClipFrameDelayed(animName, anim)); } @@ -135,7 +136,7 @@ IEnumerator PlayClipFrameDelayed(string animName, ScenegraphAnimationAsset anim) private ScenegraphAnimationAsset UpdateAnimationsListAndGetSelection() { - var matchedAnimations = _animations.Where(pair => pair.Key.StartsWith(animationName)); + var matchedAnimations = _animations.Where(pair => pair.Key.Contains(animationName.ToLowerInvariant())); var tenMatchedAnimations = matchedAnimations.Take(10).ToArray(); // Display 10 matching animations.