@codegraphy-dev/plugin-unity
v0.3.1
Published
CodeGraphy Unity plugin
Maintainers
Readme
CodeGraphy Unity
Adds Unity project structure analysis to CodeGraphy.
- Package:
@codegraphy-dev/plugin-unity - Core API:
@codegraphy-dev/plugin-api - Extension API:
@codegraphy-dev/extension-plugin-api
This package has two plugin entries. The Core entry analyzes Unity projects and declares Unity graph semantics. The Extension entry owns Unity Graph View colors, shapes, and icons. The CLI loads only the Core entry.
Install
This package requires Node.js ^22.14.0 || >=23.6.0. Node.js 20 is not supported.
Install @codegraphy-dev/core first if the codegraphy CLI is not already available.
npm i -g @codegraphy-dev/plugin-unity
codegraphy plugins register @codegraphy-dev/plugin-unity
codegraphy plugins enable @codegraphy-dev/plugin-unity
codegraphy indexDetection coverage
.unityscene files stay visible as file nodes and emit GameObject and Component Symbol Nodes..prefabfiles stay visible as file nodes and emit GameObject and Component Symbol Nodes.- MonoBehaviour components resolve their C# script names through Unity
.metaGUID files when those files are present in the workspace. - Unity containment emits
containsedges from the scene or prefab file node to GameObject, and from GameObject to Component. - MonoBehaviour script references emit
referenceedges to the resolved C# script file. - Unity asset references use the standard
referenceedge row for resolved scripts, prefab instances, and serialized asset fields. - Unity persistent calls use the standard
eventedge row for serialized scene and prefab event bindings to C# methods. - Unity file groups ship icon-backed defaults for scenes, prefabs, serialized assets, materials, assembly definitions, and input actions.
- Unity generated folders and IDE/build artifacts are filtered by default, including
Library,Temp,Logs,ProjectSettings,UserSettings,.meta, generated project files, and common build outputs.
The plugin does not depend on the Unity Editor. It reads Unity's text-serialized YAML and .meta files directly.
Graph Scope
The Unity plugin contributes a Unity Graph Scope group with these rows:
- GameObject
- Component
These rows start disabled and appear when the Unity plugin applies to the indexed workspace. Scenes and prefabs use their File Nodes without duplicate Unity-specific Symbol rows.
Turning the Unity plugin off removes these Unity-specific rows, plugin default filters, plugin nodes, and Unity-sourced edges from the graph. Core C# analysis still runs for .cs files, including MonoBehaviour scripts, so normal C# symbols and relationships remain available without the Unity plugin.
An active Unity plugin contributes the Core event Edge row. Enable Events to inspect serialized callbacks such as Button.onClick or custom UnityEvent fields that invoke methods without a C# call site.
