Hi
I’m not asking for help. I just want to discuss why the animation works like this in Unity. It’s only a design discussion and I wanted to share this and maybe someone has the same opinion with me.
First of all, the way you define an animation. As a developer this is how I would like it:
1)Create an animator
2)Create an animation
3)Customize the animation by adding properties
4)Finally, attach it to an object when needed. If the object has the property/properties which I’m animating the ok. If not then either an error message or nothing at all.
Why I have to relate it with an object from the begining? Am I the only one who don’t like it this way?
If I want to do this as I described above, I have to attach it to an object, add the properties I want, remove it from the object and rename the animator because Unity decided to name it after the temporary object I attached it to. Furthermore, If I want to add or remove properties, I have to attach it again, make the changes and remove it again. I don’t know, I just don’t like it this way.
Now the states in the animator. Why I have to have a default state? Do the designers of Unity have the impression that all the object in all the games of the world have a default animation? Well, if they do, then they should know that they don’t. Here’s my situation. I have an animation for a group of objects in my game. It’s only one animation and it has the Rect:Scale property. I have one default state that is empty and my custom animation state. When the game begins it goes to the default state and it’s looping although the state is empty. I don’t like this either. Why it has to loop to an empty state? And it’s not only that, the problem is that I cannot make change to the scale of my object from a script if I don’t first call the Animator.Stop() function. Must I call the Stop() at the Awake/Start for all my objects? Why? It’s an empty state for crying out loud. I tried to set the speed to zero. Nothing. I even linked it to the exit state. Nothing. It’s just goes back to the beggining. Why is there an exit state in the first place. It loops anyways(Yes, I know, state machine). Although my custom animation is not a loop animation, when I play it and then ends, I still cannot change scale unless I call Stop() first. Doesn’t mean by definition that if the animation is not looping that it stops at the end? Is this logical?
These are my thoughts about the animation.
Your thoughts?
PS I have the personal edition of Unity and its version is 5.5.0f3