Files
openidea/src/features/run/unity.ts
T
itcodesandsliencio aa8822d9a3 feat(debugger): attach to a running Unity Editor (#2919)
Unity projects get a debug-only "Unity Editor" run configuration, selected by default. Debug opens a picker of local Unity Editor processes with the current project first; Run > Attach to Unity Process is also available. The tool installer fetches the pinned Unity Debugger 3.0.1 adapter with SHA-256 verification, and the session reports ready once the Mono runtime is up. A missing Mono executable on macOS and Linux is reported in the picker.

Refs #1436

Co-authored-by: sliencio <20137430+sliencio@users.noreply.github.com>
2026-11-16 10:16:50 +08:00

14 lines
508 B
TypeScript

import { executeAction, getAction } from "@/platform/actions";
import type { RunConfig } from "@/platform/ipc";
import { notifications } from "@/workbench/contributions";
export const UNITY_CONFIG_KIND = "unity-editor";
export async function showUnityAttach(config?: RunConfig): Promise<void> {
if (!getAction("debug.attachUnity")) {
notifications().notify({ group: "run", level: "warning", title: "Debugger is not available" });
return;
}
await executeAction("debug.attachUnity", config);
}