| name | unity-csharp-navigate |
| description | Explore Unity C# code without modifying files. Use when the user asks to read scripts, search text, find a symbol, trace references, inspect namespaces or packages, or understand where a class, method, or field is used. Do not use for code edits, renames, or refactors; use `unity-csharp-edit`. Do not use for scene inspection; use `unity-scene-inspect`. |
| allowed-tools | Bash(unity-cli:*), Read, Grep, Glob |
| metadata | {"author":"akiojin","version":"0.3.0","category":"code","triggers":["csharp","read","search","reference","symbol"],"siblings":["unity-csharp-edit","unity-csharp-reference","unity-scene-inspect"]} |
Unity C# Navigate
Navigate and search C# source via unity-cli local tools. This is the read-only sibling of unity-csharp-edit; hand off as soon as the request implies a write.
Use When
- The user wants to inspect a script or understand existing C# behavior.
- The user asks where a symbol is defined or referenced.
- The user wants to search packages or source trees before making a change.
Do Not Use When
- The user wants to modify code or create new C# files; use
unity-csharp-edit.
- The task depends on Unity scene state rather than source; use
unity-scene-inspect.
Preferred Flow
- Build or refresh the index before symbol-heavy queries.
- Anchor on the right file with
read or search.
- Use
get_symbols, find_symbol, and find_refs once the target identifier is clear.
- Narrow the search path or page size if the result set is large.
- Use
list_packages when the question might involve packages rather than project sources.
unity-cli raw read --json '{"path":"Assets/Scripts/Player.cs"}'
unity-cli raw search --json '{"pattern":"OnCollisionEnter","path":"Assets/Scripts"}'
unity-cli raw find_symbol --json '{"name":"PlayerController","kind":"class","scope":"assets"}'
unity-cli raw find_refs --json '{"name":"Health","scope":"assets","pageSize":20}'
Examples
- "Read
PlayerController.cs and explain how jumping works."
- "Find every reference to
Health in project scripts."
- "List installed packages and check whether Input System is present."
References