Problem
MCPVerificationWindow schedules verification work through an anonymous EditorApplication.delayCall and does not cancel it if the window is closed before it runs.
Evidence
Editor/MCPVerificationWindow.cs:71-83 disables UI and adds an anonymous delayed callback.
- The callback calls
RunVerification(), which performs editor mutations through JSON-RPC verification steps.
- There is no
OnDisable cleanup or retained delegate to unsubscribe.
Impact
A user can close the verification window after scheduling, but the verification still runs and mutates scenes/assets without visible UI context.
Suggested fix
Store the callback delegate, remove it in OnDisable, and check this/window lifetime before running editor mutations.
Source report
Imported from audit report item: unity-antipattern (6) / Editor/MCPVerificationWindow.cs:77.
Problem
MCPVerificationWindowschedules verification work through an anonymousEditorApplication.delayCalland does not cancel it if the window is closed before it runs.Evidence
Editor/MCPVerificationWindow.cs:71-83disables UI and adds an anonymous delayed callback.RunVerification(), which performs editor mutations through JSON-RPC verification steps.OnDisablecleanup or retained delegate to unsubscribe.Impact
A user can close the verification window after scheduling, but the verification still runs and mutates scenes/assets without visible UI context.
Suggested fix
Store the callback delegate, remove it in
OnDisable, and checkthis/window lifetime before running editor mutations.Source report
Imported from audit report item:
unity-antipattern (6)/Editor/MCPVerificationWindow.cs:77.