Search Issue Tracker
Fixed in 2017.3.0f3
Votes
1
Found in
5.6.1f1
Issue ID
913430
Regression
No
AnimationUtility.SetAnimationEvents does not trigger events correctly if Event array is not sorted by time
Steps to reproduce:
1. Open attached Unity Project "914186-SetAnimationEvents-Test".
2. Open Scene "Scene".
3. Open Window->Anim Event Viewer.
4. Drag the animation clip "Anim" into the object field there.
5. AnimEventViewer (step 3) shows the list of events currently attached to "Anim" in the order they appear in the array. Press Add Unsorted Animation Events to give them randomized timings.
6. Enter Play mode.
Expected result: The events will be triggered correctly in both sorted and unsorted mode.
Actual result: Passing an array of events unsorted by time to SetAnimationEvents causes the engine not to trigger these events properly (some are skipped - see Console).
Note: Animation events appear on the timeline regardless if the array is sorted or unsorted by time (screenshot "timeline.png" attached). Passing an unsorted array and then dragging one of the events anywhere on the timeline orders the Event array automatically and fixes the problem (gif "timeline.gif" attached).
Reproducible with: 5.5.2f1, 5.5.3f1, 5.6.1f1, 2017.1.0b7
Comments (1)
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
- [Android][BiRP] Depth processing is handled incorrectly on certain Android devices when using 2 camera's
- [APV] Cancelling Display Dialog Error is thrown after Adaptive Probe Volumes tab is open in Lighting Window
- [APV] NullReferenceException is thrown when baking Adaptive Probe Volume for a Terrain with Non-GI Contributing Tree Prototypes and multiple APV objects with different LayerMasks are present on the scene
- Hands are not recognized when using Hololens 2
- "OnTriggerExit2D" is called before "OnTriggerEnter2D" when object is destroyed immediately
Ember_Fyre
Sep 29, 2017 06:36
Happened to me 5.5.0p1. I was so confused until I debugged it and realized they were playing by the order in the array and not the time order.