Skip to content

"Commit to" button remains disabled after doing a commit in Unity 6 #35

@thomas-at-mages-edu-sg

Description

@thomas-at-mages-edu-sg

After applying workaround so icons can be displayed in the Git for Unity window, most of the items work correctly. You can see the changed files, add a commit summary and a commit message, and then the "Commit to..." button becomes visible.

However, after you press the commit button, it remains greyed out, even after you press Refresh or go to other tabs and come back. If you stop and restart Unity, everything works properly.

Code investigation shows the isBusy flag is never turned off. The code to turn it off is in a FinallyOnUI callback, which is part of the com.unity.editor.tasks subpackage.

As a workaround, in ChangesView.cs I turn the buttons back on immediately on commissioning the task:

#if false // TOD KLUDGE FOR UNITY6
            addTask
                .FinallyInUI((success, exception) =>
                    {
                        if (success)
                        {
                            //UsageTracker.IncrementChangesViewButtonCommit();

                            commitMessage = "";
                            commitBody = "";
                        }
                        isBusy = false;
                    }).Start();
#else
            addTask.Start();
            commitMessage = "";
            commitBody = "";
            Refresh();
            isBusy = false;
#endif

But I'm afraid the real fix will involve ripping out the whole com.unity.editor.tasks package and replacing it with Async (now fully supported in Unity6) or UnityEditor.Progress.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions