- Home /
Can I force Repaint Animation Window?
Hello. I am creating Component to edit Keyframes in Animation Clip.
I can edit each Keyframe's time and value in inspector, but Animation Window not updated until I repaint it manually ... for example, switch between "Dope Sheet" and "Curves", click another curve in "Curves" etc.
When I edit curve in Animation Window, inspector updated immediately. So, I want when I edit Keyframe in inspector, Animation Window updated immediately. Can I force Repaint Animation Window when inspector changed?
Sorry my English is limited. I thank you for reading it through.
Answer by doska · Apr 07, 2014 at 08:40 PM
Try
using UnityEditorInternal;
UnityEditorInternal.InternalEditorUtility.RepaintAllViews ();
Thanks doska, it works fine!
I did not know about UnityEditorInternal, it is very intersting.
Thank you veru much.
Doesn't seem to be working in 2020.2.6, I'm wondering if they changed it so that it only tries to reload the AnimationClip when you first open the clip, maybe it doesn't expect it to be changed under the hood.