-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix editor crash when re-importing GLTF while animation is playing #83104
Fix editor crash when re-importing GLTF while animation is playing #83104
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is not good way because it will affect even the cases that have nothing related to the reimport.
I suggest that get the singleton of PlayerEditor in importer or somewhere and call the function which stop the player only when a reimport occurs. However, I wonder if stop()
is really necessary; just regenerating the cache with clear_caches()
may be sufficient. Well, it should not be done in edit()
anyway.
Thanks! I did not realize there is a singleton of PlayerEditor! |
a80c63f
to
3cf3044
Compare
IMHO it's fine to stop it, as let the animation playing while reimporting is a very rare case and it's not unintuitive to see the animation stopped when re-imported. |
3cf3044
to
cd4a52e
Compare
640613c
to
8bd3a3b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Considering multithreading, it may be fine to stop before re-importing as just you have written.
Ideally, it would be better to resume playback if the animation has not changed after re-import, but given that this is editor-only, it is probably not worth it.
8bd3a3b
to
3c10493
Compare
Thanks! |
Fixes #82962
This might not be a good solution as it stops the animation everytimeedit
is called.Do we have a way to distinguish between normal
edit
andedit
caused by resource re-import? I would appreciate any feedback or alternative suggestions.