In programming it's always the cleaner way to fix the problem (mixed, inconsistent case) instead of creating a workaround for it. If no deadline is preventing you from doing the cleanup, it's always recommended. You could also think about opening multiple spine project files at once with your favourite text editor and search-and-replace all text strings that are not following your desired guideline. Visual Studio Code for example allows to open a folder and search all subdirectories at once.
You could also consider setting animations via AnimationReferenceAssets
instead of animation names:
spine-unity Runtime Documentation: Preview
spine-unity Runtime Documentation: Setting Animations
This takes animations naming out of the equation completely and works by assigning assets. It's demonstated in the example scene SpineExamples/Getting Started/3 Controlling Animation Continued
:
spine-unity Runtime Documentation: 3 Controlling Animation Continued
The workaround would be to create your own variant of the SkeletonData.FindAnimation
method which iterates over the list of all animations (SkeletonData.Animations
) and compares the name case-insensitively. This would be the least-recommended solution to this problem.