Skip to content

Commit 69f25af

Browse files
committed
update dotcraft-unity
1 parent 3087e3e commit 69f25af

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

  • plugins/dotcraft-unity/skills/dotcraft-unity

plugins/dotcraft-unity/skills/dotcraft-unity/SKILL.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ description: Use when a DotCraft thread is connected to Unity Editor through dot
77

88
## Overview
99

10-
Use `unity_execute_csharp` for short Unity Editor method-body snippets that run inside the connected Editor process. Treat it as live editor automation: it can inspect and mutate scene, asset, and project state.
10+
Use `unity_execute_csharp` for short Unity Editor snippets containing optional leading `using` directives followed by method-body statements. Treat it as live editor automation: it can inspect and mutate scene, asset, and project state. Do not send namespace, class, or method declarations.
1111

1212
This skill governs Unity tool calls, especially `unity_execute_csharp`. It does not replace normal repository file editing workflows.
1313

@@ -62,6 +62,8 @@ When confirmation is needed, describe the exact Unity action and the state it ma
6262

6363
Keep snippets short and deterministic. Prefer one clear task per call.
6464

65+
Place any required ordinary, alias, `static`, or `global` using directives at the beginning of the snippet. `using var` declarations and `using (...)` statements are method-body statements and can be used normally.
66+
6567
Use `DotCraft.Editor` API helpers for high-boilerplate inspection work. `unity_execute_csharp` snippets already import this namespace, so use `Dcu.Type`, `Dcu.Components`, `Dcu.Get`, and `Dcu.Call` directly when they replace substantial reflection or type-search code.
6668

6769
Validate inputs and return early with a readable message when required objects, assets, scenes, or Unity internal APIs are missing.

0 commit comments

Comments
 (0)