Lets say I have a top bar that I want to have show when the mouse is over its area. It will also perform a custom animation of appearing and disappearing. I setup the animation controller like the example one given.
In order for my animations to work properly I need to include a transition time >= the animations time. So for the sake of this example lets say my transition time is 2 seconds. So I play a 2 second appearing animation and a 2 second disappearing animation.
1. I move the cursor to the area, it appears. (DoTransition: True, On trigger: true). On is consumed to false.
2. I move the cursor off the area and thus (DoTransition: True and Off trigger is true). Off is consumed to false.
3. Thus my animation is playing to disappear and before the 2 second transition is up I move my mouse back into the area. What seems to happen in this case is when the 2 second transition is up, I get triggers set to true for both Off and On. Since I am in the Off state, it runs the On state (On trigger consumed to false) and then immediately after runs Off state (Off trigger consumed to false). The end result is the mouse is in the area for the menu to show yet it is in the Off state.
I hope I explained this well enough. If not I think I would need to make a video to show this.
Comments
Here you go. Its made from a fresh package import of AC 1.41a. A fresh new game wizard of unity ui. I made a simple Canvas with a panel that fades in and out for 1 second. I use the controller you provide as an example for Unity UI custom animation transitions. menu manager has a transition time of 1 to match the animation time. Repeat the steps above to emulate the problem.
Will be in 1.42.