diff --git a/.agents/skills/uloop-compile/SKILL.md b/.agents/skills/uloop-compile/SKILL.md index 2a95ecfc63..9aaba36ce4 100644 --- a/.agents/skills/uloop-compile/SKILL.md +++ b/.agents/skills/uloop-compile/SKILL.md @@ -30,3 +30,7 @@ Returns JSON: - `ErrorCount`: number or null - `WarningCount`: number or null - `Message`: string + +## Troubleshooting + +If compile times out or Unity stops responding to uloop while the Editor looks idle, check whether Unity is showing **API Update Required** / **Script Updating Consent**. Ask the user to choose Go Ahead or No — never auto-dismiss that modal. Interactive Editors have no public uloop/Unity API to suppress it. diff --git a/.claude/skills/uloop-compile/SKILL.md b/.claude/skills/uloop-compile/SKILL.md index 2a95ecfc63..9aaba36ce4 100644 --- a/.claude/skills/uloop-compile/SKILL.md +++ b/.claude/skills/uloop-compile/SKILL.md @@ -30,3 +30,7 @@ Returns JSON: - `ErrorCount`: number or null - `WarningCount`: number or null - `Message`: string + +## Troubleshooting + +If compile times out or Unity stops responding to uloop while the Editor looks idle, check whether Unity is showing **API Update Required** / **Script Updating Consent**. Ask the user to choose Go Ahead or No — never auto-dismiss that modal. Interactive Editors have no public uloop/Unity API to suppress it. diff --git a/Packages/src/Editor/FirstPartyTools/Compile/Skill/SKILL.md b/Packages/src/Editor/FirstPartyTools/Compile/Skill/SKILL.md index 2a95ecfc63..9aaba36ce4 100644 --- a/Packages/src/Editor/FirstPartyTools/Compile/Skill/SKILL.md +++ b/Packages/src/Editor/FirstPartyTools/Compile/Skill/SKILL.md @@ -30,3 +30,7 @@ Returns JSON: - `ErrorCount`: number or null - `WarningCount`: number or null - `Message`: string + +## Troubleshooting + +If compile times out or Unity stops responding to uloop while the Editor looks idle, check whether Unity is showing **API Update Required** / **Script Updating Consent**. Ask the user to choose Go Ahead or No — never auto-dismiss that modal. Interactive Editors have no public uloop/Unity API to suppress it. diff --git a/cli/common/errors/error_editor_unresponsive.go b/cli/common/errors/error_editor_unresponsive.go index e776534159..6b509e6a9b 100644 --- a/cli/common/errors/error_editor_unresponsive.go +++ b/cli/common/errors/error_editor_unresponsive.go @@ -2,6 +2,11 @@ package clierrors import "github.com/hatayama/unity-cli-loop/common/unityipc" +// ApiUpdateConsentModalNextAction is shared recovery guidance when the Editor main +// thread may be blocked by Unity's API Update / Script Updating Consent modal. +// Interactive Editors have no public suppress path. +const ApiUpdateConsentModalNextAction = "The Editor may be showing an API Update / Script Updating Consent modal; check the Unity window and ask the user what to choose — never auto-dismiss it." + func connectionAttemptCause(err *unityipc.ConnectionAttemptError) string { if err == nil { return "" @@ -24,6 +29,7 @@ func unityEditorUnresponsiveError(err *unityipc.EditorUnresponsiveError, context Command: context.Command, NextActions: []string{ "Check Unity for a modal dialog or long editor operation that is blocking the Editor main thread.", + ApiUpdateConsentModalNextAction, "Run `uloop focus-window` if Unity is hidden behind another window.", "Close the modal dialog or wait for the Editor operation to finish, then retry the command.", }, diff --git a/cli/common/errors/error_envelope_test.go b/cli/common/errors/error_envelope_test.go index 7860144d89..438f04798b 100644 --- a/cli/common/errors/error_envelope_test.go +++ b/cli/common/errors/error_envelope_test.go @@ -140,6 +140,9 @@ func TestClassifyEditorUnresponsiveError(t *testing.T) { if !strings.Contains(joinedActions, "modal dialog") { t.Fatalf("next actions should mention modal dialog: %#v", cliErr.NextActions) } + if !strings.Contains(joinedActions, "API Update") || !strings.Contains(joinedActions, "never auto-dismiss") { + t.Fatalf("next actions should mention API Update consent guidance: %#v", cliErr.NextActions) + } if !strings.Contains(joinedActions, "uloop focus-window") { t.Fatalf("next actions should mention focus-window: %#v", cliErr.NextActions) } diff --git a/cli/dispatcher/shared-inputs-stamp.json b/cli/dispatcher/shared-inputs-stamp.json index 5fb6596a61..3345afda4f 100644 --- a/cli/dispatcher/shared-inputs-stamp.json +++ b/cli/dispatcher/shared-inputs-stamp.json @@ -1,4 +1,4 @@ { "schemaVersion": 1, - "sharedInputsHash": "8b248a96bc8a1cbc8312c7f77da08d9ef8903680" + "sharedInputsHash": "fbbc3c34d301331c513155ea2bab2a33a4b5de97" } diff --git a/cli/project-runner/internal/projectrunner/compile_wait_test.go b/cli/project-runner/internal/projectrunner/compile_wait_test.go index 7da29d091b..c37d9bcc7f 100644 --- a/cli/project-runner/internal/projectrunner/compile_wait_test.go +++ b/cli/project-runner/internal/projectrunner/compile_wait_test.go @@ -574,6 +574,7 @@ func TestCompileWaitTimeoutError(t *testing.T) { expectedActions := []string{ "Run a light command such as `uloop get-logs --max-count 1` to check whether Unity is responsive before treating this as a freeze.", "Unity-side compile continues after this timeout; retry `uloop compile` — the result remains retrievable for about 10 more minutes without `uloop launch -r`.", + clierrors.ApiUpdateConsentModalNextAction, "Only if Unity does not respond to any command, restart it with `uloop launch -r`.", } if len(cliErr.NextActions) != len(expectedActions) { diff --git a/cli/project-runner/internal/projectrunner/execution_errors.go b/cli/project-runner/internal/projectrunner/execution_errors.go index e8caddfe5f..a1bf1261d1 100644 --- a/cli/project-runner/internal/projectrunner/execution_errors.go +++ b/cli/project-runner/internal/projectrunner/execution_errors.go @@ -25,6 +25,7 @@ func compileWaitTimeoutError(projectRoot string) clierrors.CLIError { NextActions: []string{ "Run a light command such as `uloop get-logs --max-count 1` to check whether Unity is responsive before treating this as a freeze.", "Unity-side compile continues after this timeout; retry `uloop compile` — the result remains retrievable for about 10 more minutes without `uloop launch -r`.", + clierrors.ApiUpdateConsentModalNextAction, "Only if Unity does not respond to any command, restart it with `uloop launch -r`.", }, } diff --git a/cli/project-runner/shared-inputs-stamp.json b/cli/project-runner/shared-inputs-stamp.json index e608f05e02..7e7d299f1b 100644 --- a/cli/project-runner/shared-inputs-stamp.json +++ b/cli/project-runner/shared-inputs-stamp.json @@ -1,4 +1,4 @@ { "schemaVersion": 1, - "sharedInputsHash": "8c336555a69a3cf485147e5669ce8bb4d3fe2982" + "sharedInputsHash": "581697442cd42c4467c8a80ab3bce98f403890c6" }