Under review

Can't change animation event type

todd-profanegames 8 months ago updated 7 months ago 8

On Unity 2023.2.15f1 with UMotion v1.29p03 I am no longer able to change the value of the Type combo from Void to any other value.  The moment I click on the Type combo, the event modal disappears.  This is completely killing my workflow as I always define events within UMotion instead of on the exported .anim clip because: a. it ensures I don't accidentally overwrite my events the next time I export the clip and b. it is almost always necessary to scrub the timeline while looking at the animated character to decide where to place events.



Just before I click on the Type combo:

Image 1395

After I click on the Type combo the combo options remain but the event modal disappears.  If I click any of these options they do not get applied to the event, it is stuck with Void selected indefintiely:

Image 1396


 

UMotion Version:
1.29p03
Unity Version:
2023.2.15f1
Under review

Hi todd-profanegames,
I'm sorry to hear that you are experiencing a workflow breaking issue. Can you confirm that this issue still arises after restarting Unity? Sometimes Unity has weird GUI bugs that disappear after re-starting.

Does this problem also arise if you create a fresh (empty) Unity project in 2023.2.15f1 and import UMotion from the asset store there? This is to rule out any potential side-effects due to other editor scripts in your project.


Looking forward to your response. Thank you very much.

Best regards,
Peter

Hi Peter,

Thanks for the prompt response.  I took your advice and created an empty Unity 2023.2.15f1 HDRP project and unfortunately for me, the issue is not reproducible.  The issue is however still reproducible in my main project after a restart of the editor.  So that implies the issue must be related to something in my main project, but not necessarily UMotion or the Unity version.  This is going to be like finding a needle in a haystack as my project is massive, including other Asset Store plugins and many of my own custom editor extensions.  I took a look at your DLLs to see if I could determine how your implementation might conflict with some of my editor extensions, but you did too good of a job of obfuscating it for it to be readable.  Is there anything you can tell me about the click event on the Type combo that may be useful to track down my code that may be intercepting it?

Hi Todd,
this is the code that's responsible for closing the dialog:

public class ... : EditorWindow
{
    // Unity Event
    protected void OnLostFocus()
    {
        Close();
    }
}

In other words, the UMotion event properties editor window automatically closes when the window lost input focus. So you might be looking to some editor extension that's changing which editor window is currently focused.


One way to find it would be by duplicating the entire project, then start removing editor extensions one by one. The last editor extension you've removed after which the UMotion event dialog suddenly starts working, was the one that caused the issue.


Please let me know what you find out.


Best regards,
Peter

Hi Peter,

Interesting, so in theory something about clicking the Type combo item is triggering the lost focus event on the Animation Event window.  I've gone through all my custom extensions in a separate project and verified they are not the cause, as most of them are just custom inspectors or property drawers which only affect the editor when their corresponding component is being inspected.  I always commented out all calls to [InitializeOnLoad] as those scripts would be the most likely culprit, but the issue still occurs even after restarting the editor.  The curious symptom is the fact that the combo items list still remains visible when this happens, which makes me wonder if you look at the implementation of your Close method whether or not that would even be possible.  If it wouldn't be possible, then maybe OnLostFocus isn't actually getting fired and therefore the cause could be something else.  I'll keep digging, thanks.

Under review


which makes me wonder if you look at the implementation of your Close method whether or not that would even be possible

The close method is from Unity (so I can't really verify this): https://docs.unity3d.com/ScriptReference/EditorWindow.Close.html

From my experience I do think that the combo box can indeed still be displayed even after the editor window was already closed.

Maybe you also want to check/compare the installed Unity packages (with your empty project). Could be due to such a package as well.

Best regards,
Peter

I am experiencing the same issue on 2023.2.20f1 and UMotion v1.29p03. In my case the problem persists even in a clean 3D (Built-in Render Pipeline) project with just UMotion installed. The issue is not present in a clean 2022.3.28f1 project.

Yes, I am on windows 10