Feature: add AnimationEventView and events_iter for viewing AnimationClip events#24437
Open
christopherverch wants to merge 2 commits into
Open
Feature: add AnimationEventView and events_iter for viewing AnimationClip events#24437christopherverch wants to merge 2 commits into
christopherverch wants to merge 2 commits into
Conversation
laundmo
reviewed
May 25, 2026
Comment on lines
+219
to
+220
| /// Use this when you need to manually inspect or trigger animation events | ||
| /// outside of the standard animation playback system. |
Member
There was a problem hiding this comment.
This kinda implies that this is a triggerable event, could be clearer
Member
|
I added |
Author
|
True on both counts, I changed the comments and I agree it is likely not the best solution, but it's definitely usable. It just seems like something that should be easily accessible and this is the best way I could find without making all the underlying structs pub. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Objective
A system needs to play animations starting at a certain time, but sometimes you don't want to skip the animation events that came before.
For example, a sword unsheathing should always play the unsheath sound, but sometimes the animation is played from a bit further into the unsheathing for a different starting pose.
Solution
This PR gives a "view" into the animation events, so that if someone needs to manually trigger them, they can. It's a bit awkward to use since it copies the internal trigger fn, but it's still useful enough that it seems worth adding.
Testing
I stuck this code into the animation_events example and it reliably manually triggers both animation events every 0.4 seconds.
I understand this is a bit unwieldy, but this seems like an important thing to be able to access.