- Home /
How to expand animation event window.
How can I change this window?
Answer by Bunny83 · Mar 24, 2016 at 01:55 PM
It's not possible to modify or replace that editor window with a custom one. That editor window class is called "AnimationEventPopup" and is an internal type. It is hardcoded into the AnimationWindow code itself. They open that specific window as popup. So there's no way with the built-in methods to somehow replace / extend the functionality of that window.
What functionality do you miss? An AnimationEvent holds only a limited amount of data.
As said there's no way inside of Unity to change the behaviour of that window. If it's really important there is theoretically a way. Though this is more a "hack" than a solution:
Create a backup of the UnityEditor.dll
Create a new version of the "AnimationEventPopup" editor window and compile it to a seperate dll
Use ildasm to decompile your own dll to IL code
Use ildasm to decompile the UnityEditor.dll to IL
Find the AnimationEventPopup class in both IL texts
Replace the original editor window code with your modified version.
Use ilasm to recompile the UnityEditor.dll
replace the old dll with your new version.
Note: This is most likely against the eula of Unity. So you can't publish or even sell such a "hack". Of course it can (potentially) lead to other problems as well. It's not even guaranteed that the pure recompile doesn't already break it (hence the backup ^^).
Another way would be to use the cecil library to kind of automate the replacement of the class.
Your last option is to post a feature request and wait for a future version of Unity that might has this feature implemented. However it's unlikely that will happen. They implement features that most users need / want. Though if you think it's important enough you can file a feature request. If you do, make sure you post a link here in a comment so other people can vote for it.
Thanks a lot for your thorough answer. I am a novice for Unity , programmer as well. So if I use your solution, it seems I will meet more trouble than now.
Tanks again :)
Answer by Abhiroop-Tandon · Mar 23, 2016 at 01:00 PM
Shift+Space
I mean I need some API just like "OnInspectorGUI()" to change the content in this Window
Your answer
