Search Issue Tracker
By Design
Votes
0
Found in
2021.3.45f1
2022.3.51f1
6000.0.24f1
6000.1.0a1
6000.2.0a1
Issue ID
UUM-85472
Regression
No
Animation fails to trigger when Animator enters Animation State and Animator Component is on the parent GameObject
Reproduction steps:
1. Open the attached “IN-86926.zip” project
2. Open the “Menu” Scene
3. Enter the Play mode
4. Observe the Game view
Expected result: Filmrolls (“FilmanimatorA” and “FilmanimatorB” GameObjects) transition into the Scene from top and bottom
Actual result: Only the bottom filmroll transitions into the Scene, the top one animation is already in the Scene
Reproducible with: 2021.3.45f1, 2022.3.51f1, 6000.0.24f1, 6000.1.0a1
Reproduced on: Windows 11
Not reproducible on: No other environment tested
Notes:
- The animation works correctly when viewing the Preview in Animation tab
- The exiting animation (after mouse click is detected in the Game view) is also affected, however it affects the bottom GameObject
- Deleting the Library folder made both GameObjects (“FilmanimatorA” and “FilmanimatorB”) lose their start animation, however the exiting animation then worked correctly on both of them
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- UI Elements/Layout inconsistencies in the Particle System component
- The Game view and Scene view fail to render when launching the Editor with a maximized Render Graph Viewer window
- "List is empty" is poorly visible in the "Create Node" window
- [Android] GameObject with a custom shader becomes invisible when deployed with the Vulkan Graphics API
- “ReferenceError: Pointer_stringify is not defined” error is thrown when downloading a file
Resolution Note:
First of all, the bug is indeed acknowledged, but I will have to close it as by design, but I can give an explanation as to why it is happening, with a workaround.
Why does the issue happen?
the current animation system is not made to support animating the same property on two different animators in the same hierarchy, even if they are not animating at the same time. In your specific case, you have an animator in the "StartScreen" game object, and an animator in "FilmanimatorA". Both are animating the same transform property, aka the FilmAnimatorA.anchorPosition. Even if they are not being animated at the same time, what will happen is that depending on the ordering of the animator evaluation, the last one to be played will have the last say, even if it does not modify the property at this time. This is why for the FilmUIn, it may work, for for the way out, it may not, or the other way around. I would have to say that the lack of determinism is a bug on our side though, as the fact that sometimes only the "film In" works, and sometimes only the "film Out" works should not happen (what we should do is make sure that either the root always executes first, and child last, or the opposite, but not random). Modifying this is not without risk, and might cause regressions to fix an edge case.
Workarounds?
1. Simply make sure not to animate the same property in two different animators in the same hierarchy. So animate the FilmAnimatorA and B anchored positions both in the StartStreen animator, or in the respective child GO.
2. For your specific project, a quick workaround could simply be to add a parent GO to FilmAnimatorA (let's call it AParent) and another to FilmAnimatorB (BParent), and in the StartScreen "TitleOut" animation, remove the animation of FilmAnimatorA and FilmAnimatorB anchored position. Instead, animated the new parents anchored positions to remove the films the same way you did before. This way, you don't animate the same property as the child animators.
Hope that solves your issues!