diff --git a/.cursor-plugin/plugin.json b/.cursor-plugin/plugin.json index 6bc20a9..cbb9b67 100644 --- a/.cursor-plugin/plugin.json +++ b/.cursor-plugin/plugin.json @@ -2,7 +2,7 @@ "name": "unity-developer-tools", "displayName": "Unity Developer Tools", "description": "AI-powered development toolkit for Unity. Scaffold scripts, look up APIs, write shaders, and build games with best-practice rules for C#, Visual Scripting, and HLSL.", - "version": "1.4.1", + "version": "1.4.5", "author": { "name": "TMHSDigital", "email": "contact@tmhospitalitystrategies.com" diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..5ace460 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,6 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index 6da21fe..fa260f8 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -19,9 +19,9 @@ jobs: name: Build documentation site runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - - uses: actions/setup-python@v5 + - uses: actions/setup-python@v6 with: python-version: "3.12" @@ -41,7 +41,7 @@ jobs: - name: Build site run: mkdocs build --strict - - uses: actions/upload-pages-artifact@v3 + - uses: actions/upload-pages-artifact@v5 with: path: site/ @@ -53,5 +53,5 @@ jobs: name: github-pages url: ${{ steps.deployment.outputs.page_url }} steps: - - uses: actions/deploy-pages@v4 + - uses: actions/deploy-pages@v5 id: deployment diff --git a/.github/workflows/drift-check.yml b/.github/workflows/drift-check.yml index 29d5abf..4e858fc 100644 --- a/.github/workflows/drift-check.yml +++ b/.github/workflows/drift-check.yml @@ -14,8 +14,8 @@ jobs: permissions: contents: read steps: - - uses: actions/checkout@v5 - - uses: TMHSDigital/Developer-Tools-Directory/.github/actions/drift-check@v1.7 + - uses: actions/checkout@v6 + - uses: TMHSDigital/Developer-Tools-Directory/.github/actions/drift-check@v1.9 with: mode: self format: gh-summary diff --git a/.github/workflows/label-sync.yml b/.github/workflows/label-sync.yml index aeb952f..3f03d30 100644 --- a/.github/workflows/label-sync.yml +++ b/.github/workflows/label-sync.yml @@ -13,7 +13,7 @@ jobs: name: Auto-label by path runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Get changed files id: files diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bc16917..1ebd15d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,15 +3,6 @@ name: Release on: push: branches: [main] - paths-ignore: - - ".github/**" - - "docs/**" - - "*.md" - - "LICENSE" - - "skills/**" - - "rules/**/*.mdc" - - "AGENTS.md" - - "CLAUDE.md" permissions: contents: write @@ -25,7 +16,7 @@ jobs: name: Bump version, tag, and release runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 with: fetch-depth: 0 token: ${{ secrets.GITHUB_TOKEN }} @@ -207,7 +198,7 @@ jobs: run: | git config user.name "github-actions[bot]" git config user.email "41898282+github-actions[bot]@users.noreply.github.com" - git add .cursor-plugin/plugin.json README.md CHANGELOG.md + git add -A git commit -m "chore: bump version to ${{ steps.new.outputs.version }} [skip ci]" git push @@ -219,7 +210,7 @@ jobs: - name: Create GitHub Release if: steps.check.outputs.skip == 'false' - uses: softprops/action-gh-release@v2 + uses: softprops/action-gh-release@v3 with: tag_name: "v${{ steps.new.outputs.version }}" name: "v${{ steps.new.outputs.version }}" diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index eeab2d3..eae3b81 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -14,7 +14,7 @@ jobs: name: Close stale issues and PRs runs-on: ubuntu-latest steps: - - uses: actions/stale@v9 + - uses: actions/stale@v10 with: stale-issue-message: > This issue has been automatically marked as stale because it has not had diff --git a/.github/workflows/update-unity-api.yml b/.github/workflows/update-unity-api.yml index a7fa647..89973eb 100644 --- a/.github/workflows/update-unity-api.yml +++ b/.github/workflows/update-unity-api.yml @@ -13,9 +13,9 @@ jobs: name: Refresh MCP data files runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - - uses: actions/setup-python@v5 + - uses: actions/setup-python@v6 with: python-version: "3.12" diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index acdafa4..8bb6da6 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -14,7 +14,7 @@ jobs: name: Validate JSON files runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Validate plugin.json run: python3 -c "import json; json.load(open('.cursor-plugin/plugin.json'))" @@ -96,7 +96,7 @@ jobs: name: Validate plugin manifest runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Check required manifest fields run: | @@ -137,7 +137,7 @@ jobs: name: Validate skill files runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Check SKILL.md frontmatter run: | @@ -190,7 +190,7 @@ jobs: name: Validate rule files runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Check .mdc frontmatter run: | @@ -235,7 +235,7 @@ jobs: name: Validate content quality runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Check for em dashes and en dashes run: | @@ -282,7 +282,7 @@ jobs: name: Validate templates runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Check template structure run: | @@ -323,7 +323,7 @@ jobs: name: Validate content counts runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Check content counts match README run: | @@ -370,9 +370,9 @@ jobs: name: Validate MCP server runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - - uses: actions/setup-python@v5 + - uses: actions/setup-python@v6 with: python-version: "3.12" diff --git a/.gitignore b/.gitignore index 14af599..b8c62af 100644 --- a/.gitignore +++ b/.gitignore @@ -46,6 +46,9 @@ desktop.ini # Research (reference only, not needed in published plugin) RESEARCH.md + +# Release build artifacts (uploaded to GitHub Release assets, not committed to main; see DTD#55) +*.zip # Phase 2c: release-doc-sync verification trigger (DTD#5) # DTD#27: release-doc-sync v1 migration verification diff --git a/AGENTS.md b/AGENTS.md index e2a91cc..55c0ffc 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,4 +1,4 @@ - + # AGENTS.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 540aeb8..eca87db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,22 @@ All notable changes to this project will be documented in this file. +## [1.4.5] - 2026-04-26 + +See [release notes](https://github.com/TMHSDigital/Unity-Developer-Tools/releases/tag/v1.4.5) for details. + +## [1.4.4] - 2026-04-26 + +See [release notes](https://github.com/TMHSDigital/Unity-Developer-Tools/releases/tag/v1.4.4) for details. + +## [1.4.3] - 2026-04-26 + +See [release notes](https://github.com/TMHSDigital/Unity-Developer-Tools/releases/tag/v1.4.3) for details. + +## [1.4.2] - 2026-04-26 + +See [release notes](https://github.com/TMHSDigital/Unity-Developer-Tools/releases/tag/v1.4.2) for details. + ## [1.4.1] - 2026-04-25 See [release notes](https://github.com/TMHSDigital/Unity-Developer-Tools/releases/tag/v1.4.1) for details. diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..cdeaeb0 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,152 @@ + + +# CLAUDE.md + +Project documentation for Claude Code and AI assistants working on this repository. + +## Project Overview + +Unity Developer Tools is a Cursor IDE plugin for Unity game development. It includes 18 skills, 8 rules, 20 code snippets across C# / HLSL / Visual Scripting, 5 starter templates, and a companion Python MCP server with 4 tools for script scaffolding, Unity API lookup, shader patterns, and platform information. + +**Works with:** Cursor (plugin), Claude Code (terminal and in-editor), and any MCP-compatible client. + +This is a monorepo. Skills, rules, snippets, templates, and the companion MCP server live in the same repository because Unity development crosses all of those layers in a single workflow. + +**Version:** 1.4.5 +**License:** CC-BY-NC-ND-4.0 +**Author:** TMHSDigital + +## Plugin Architecture + +``` +Unity-Developer-Tools/ + .cursor-plugin/ + plugin.json # Plugin manifest (version, skills, rules) + skills/ + / + SKILL.md # One skill per directory (kebab-case) + rules/ + .mdc # Cursor rule files + snippets/ + csharp/ # C# patterns and examples + shaders/ # HLSL / ShaderLab patterns + visual-scripting/ # Visual Scripting graphs and notes + templates/ # Starter project archetypes + mcp-server/ + server.py # MCP server entry point (Python, FastMCP) + data/ # API reference, deprecated patterns, shader props, platform defines + requirements.txt + docs/ # MkDocs Material site (ARCHITECTURE, ROADMAP, GETTING-STARTED) + .github/ + workflows/ # CI / release / docs / drift-check automation +``` + +## Skills (18) + +| Skill | Description | +|-------|-------------| +| `project-setup` | Folder structure, assembly definitions, version control, and package management for Unity projects | +| `monobehaviour-patterns` | MonoBehaviour lifecycle, async patterns with Awaitable, and common Unity design patterns | +| `scriptableobjects` | Data-driven design with ScriptableObjects (events, variables, runtime sets, configuration) | +| `physics-2d-3d` | Collision, raycasting, layers, and rigidbody management for 2D and 3D projects | +| `ui-development` | UI Toolkit (primary) and Canvas/UGUI, including data binding, styling, responsive layouts | +| `shader-development` | Shader Graph, HLSL, and ShaderLab for URP and HDRP projects | +| `animation-systems` | Animator Controller, Timeline, DOTween, and sprite animation for 2D | +| `audio-systems` | AudioSource, AudioMixer, spatial audio, and audio management patterns | +| `input-systems` | New Input System package and migration guidance from the legacy Input Manager | +| `networking` | Multiplayer networking with Netcode for GameObjects, Netcode for Entities, Mirror, Photon Fusion | +| `editor-scripting` | Custom inspectors, editor windows, property drawers, gizmos, Scene View overlays via UI Toolkit | +| `performance-optimization` | CPU, GPU, memory, and profiling tools (Profiler, Memory Profiler, Frame Debugger) | +| `render-pipeline-detection` | Detect and adapt to URP, HDRP, or Built-in pipelines | +| `ecs-dots` | Entity Component System with Unity Entities, Jobs, and Burst | +| `visual-scripting` | Script Graphs, State Graphs, Subgraphs, and custom units | +| `testing` | Unity Test Framework 2.x with Edit Mode and Play Mode tests, async Awaitable support | +| `addressables-assets` | Async loading, memory management, and remote content delivery via Addressables | +| `platform-targeting` | Scripting defines, build settings, and cross-platform considerations | + +## Rules (8) + +| Rule | Scope | Description | +|------|-------|-------------| +| `csharp-unity-conventions.mdc` | `**/*.cs` | C# coding conventions for Unity development | +| `monobehaviour-lifecycle.mdc` | `**/*.cs` | Correct usage of MonoBehaviour lifecycle methods | +| `performance-rules.mdc` | `**/*.cs` | Performance optimization rules (allocations, FindObject, tight loops) | +| `naming-conventions.mdc` | `**/*.cs` | Naming conventions for Unity C# code | +| `serialization-rules.mdc` | `**/*.cs` | Unity serialization best practices (`[SerializeField]`, ISerializationCallbackReceiver) | +| `shader-conventions.mdc` | `**/*.shader`, `**/*.hlsl`, `**/*.cginc`, `**/*.shadergraph` | Conventions for Unity shader development (HLSLPROGRAM, SRP Batcher) | +| `visual-scripting-conventions.mdc` | `**/*.asset` | Best practices for Unity Visual Scripting graphs | +| `security-and-builds.mdc` | `**/*.cs`, `**/*.json`, `**/*.asset` | Security and build configuration rules (no hardcoded secrets, build target hygiene) | + +## MCP Server (4 tools) + +The companion MCP server is Python-based (FastMCP). It exposes Unity-aware tools that read from local data files (`mcp-server/data/`) and accept agent-supplied parameters. + +| Tool | Description | +|------|-------------| +| `scaffold_script` | Generate a structured C# script (MonoBehaviour, ScriptableObject, EditorWindow, custom inspector, property drawer, interface, state machine, test) with recommended folder placement | +| `lookup_api` | Search the Unity API reference (name, namespace, signature, examples) with optional category filter and deprecated-pattern warnings | +| `shader_helper` | Fetch shader patterns and property setups for common effects (dissolve, outline, toon, water, hologram, fresnel) per render pipeline | +| `platform_info` | Get platform-specific scripting defines, capabilities, limitations, and recommendations (Windows, macOS, Linux, Android, iOS, WebGL, PS5, Xbox, Switch) | + +## Development Workflow + +### Plugin development (symlink) + +**macOS / Linux:** +```bash +ln -s "$(pwd)" ~/.cursor/plugins/unity-developer-tools +``` + +**Windows (PowerShell as Admin):** +```powershell +New-Item -ItemType SymbolicLink -Path "$env:USERPROFILE\.cursor\plugins\unity-developer-tools" -Target (Get-Location) +``` + +### MCP server development + +```bash +cd mcp-server +pip install -r requirements.txt +python server.py +``` + +### Running validation + +```bash +# JSON schema and content-count checks (run by CI) +python .github/scripts/validate_plugin.py +``` + +## Release Workflow + +Releases are automated. The `release.yml` workflow: + +1. Reads conventional commits since the last tag. +2. Computes the next semver bump (PATCH for `fix:`, MINOR for `feat:`, MAJOR for `BREAKING CHANGE`). +3. Updates `plugin.json` `version` and the README version badge. +4. Creates the tag, the GitHub Release, and floating major / minor tags. +5. Invokes `release-doc-sync` to update `**Version:**` in this file and prepend a CHANGELOG entry. + +Do not hand-edit `plugin.json` `version`, the README badge, or the `**Version:**` line above. The release pipeline owns them. + +## Key Conventions + +- **No em dashes.** Use regular dashes (`-`) or rewrite the sentence. CI flags em and en dashes in markdown. +- **No hardcoded credentials.** Use environment variables, `EditorUserSettings`, or a secrets store. CI flags suspicious patterns. +- **Skill frontmatter:** `title`, `description`, `globs` (when path-scoped), and `standards-version`. +- **Rule frontmatter:** `title`, `description`, `globs`, `alwaysApply`, and `standards-version`. +- **Snippets:** must compile against Unity 6.x and use modern APIs (Awaitable, `FindFirstObjectByType`, UI Toolkit). No placeholder credentials. +- **Templates:** every template needs a top-level `README.md` describing usage, scripts, and any project setup notes (assembly definitions, package dependencies). +- **MCP tool naming:** snake_case Python functions decorated with `@mcp.tool()`. + +## Unity Reference Quick Links + +| Resource | Use | +|----------|-----| +| `docs.unity3d.com/Manual/index.html` | Authoritative Unity manual | +| `docs.unity3d.com/ScriptReference/index.html` | Scripting API reference | +| `docs.unity3d.com/Packages/` | Package-specific manuals (URP, HDRP, Input System, Netcode, Entities) | +| `mcp-server/data/unity_api_common.json` | Local Unity API quick-reference index | +| `mcp-server/data/deprecated_patterns.json` | Deprecation map (legacy -> replacement) | +| `mcp-server/data/shader_properties.json` | Shader effect patterns and property setups | +| `mcp-server/data/platform_defines.json` | Platform scripting defines and capabilities | diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..6f8cf77 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,143 @@ +# Contributing to Unity Developer Tools + +Thanks for helping improve this plugin. This document describes how to set up locally, extend skills and rules, and submit changes. + +## Getting Started + +1. **Fork** the repository on GitHub. +2. **Clone** your fork: + + ```bash + git clone https://github.com//Unity-Developer-Tools.git + cd Unity-Developer-Tools + ``` + +3. **Create a branch** for your work: + + ```bash + git checkout -b your-feature-name + ``` + +## Local Development + +Install the plugin from your working copy so Cursor loads your changes. + +Symlink the repo into the local plugins directory: `~/.cursor/plugins/local/unity-developer-tools/` (create parent folders if needed). + +**Windows (PowerShell):** + +```powershell +New-Item -ItemType Directory -Force -Path "$env:USERPROFILE\.cursor\plugins\local\unity-developer-tools" | Out-Null +cmd /c mklink /J "$env:USERPROFILE\.cursor\plugins\local\unity-developer-tools\Unity-Developer-Tools" (Get-Location) +``` + +Adjust the final path if your clone lives elsewhere. + +**macOS / Linux:** + +```bash +mkdir -p ~/.cursor/plugins/local/unity-developer-tools +ln -s "$(pwd)" ~/.cursor/plugins/local/unity-developer-tools/Unity-Developer-Tools +``` + +Restart Cursor after linking so it picks up the plugin. + +## Plugin Structure + +The repo is organized as a Cursor plugin with **18 skills** and **8 rules**, plus snippets, templates, and a companion MCP server. + +```text +.cursor-plugin/ + plugin.json +skills/ + / + SKILL.md +rules/ + .mdc +snippets/ + csharp/ + shaders/ + visual-scripting/ +templates/ +mcp-server/ + server.py + data/ +docs/ +.github/ + workflows/ +``` + +- **`plugin.json`** - manifest (name, version, paths to skills/rules). +- **`skills/`** - one directory per skill; each contains `SKILL.md`. +- **`rules/`** - Cursor rules as `.mdc` files with YAML frontmatter. +- **`snippets/`** - C#, HLSL/ShaderLab, and Visual Scripting examples organized by language. +- **`templates/`** - starter project archetypes (2D platformer, 3D FPS, UI menu, ScriptableObject architecture, editor tool). +- **`mcp-server/`** - Python MCP server exposing Unity-aware tools (script scaffolding, API lookup, shader patterns, platform info). + +## Adding a Skill + +1. Add a **kebab-case** directory under `skills/`, e.g. `skills/unity-example-flow/`. +2. Create **`SKILL.md`** with YAML frontmatter including at least `title`, `description`, and `globs` (path-scoped patterns where applicable, e.g. `["**/*.cs"]`, `["**/*.shader", "**/*.hlsl"]`). +3. In the body, include sections (use `##` headings) such as: + - **Overview / Why** - when the skill applies and what problem it solves. + - **Required Inputs** - what the agent or user must provide. + - **Workflow** - step-by-step guidance. + - **Key References** - Unity manual links, package names, or repo paths. + - **Example Interaction** - short example prompt/response pattern. + - **MCP Usage** - when to use the companion MCP server, if relevant. + - **Common Pitfalls** - mistakes to avoid (deprecated APIs, render-pipeline confusion, MonoBehaviour lifecycle traps, etc.). + - **See Also** - links to related skills or rules. + +Match tone, formatting, and frontmatter style of existing skills in this repo. + +## Adding a Rule + +1. Add a **`.mdc`** file under `rules/`, e.g. `rules/unity-example.mdc`. +2. Start with YAML **frontmatter**: + - `title` - one-line summary. + - `description` - longer description for humans and tooling. + - `globs` - glob patterns scoping the rule (e.g. `["**/*.cs"]`, `["**/*.shader", "**/*.hlsl", "**/*.cginc", "**/*.shadergraph"]`). + - `alwaysApply` - `true` or `false` depending on whether the rule should apply globally. + +3. Below the frontmatter, write the rule content in Markdown (constraints, patterns, anti-patterns). + +Keep rules focused; prefer linking to a skill for long workflows. + +## Adding a Snippet or Template + +1. Snippets live under `snippets/` grouped by language (`csharp/`, `shaders/`, `visual-scripting/`). Each file should be self-contained, target Unity 6.x APIs (Awaitable, `FindFirstObjectByType`, UI Toolkit), and free of hardcoded credentials. +2. Templates live under `templates/`. A new template needs at least a top-level `README.md` describing usage, the canonical scripts, and any project setup notes (assembly definitions, package dependencies, scripting defines). +3. Run the validators before opening a PR; CI checks JSON validity, plugin manifest completeness, file count consistency, em/en dash detection, and credential scanning. + +## Pull Request Process + +1. **Update docs** if you change behavior, skill lists, snippet counts, or versioning (`README.md`, `CLAUDE.md`, `CHANGELOG.md`, `docs/ROADMAP.md` as appropriate). +2. **Run validation** locally where possible. CI runs JSON schema checks, kebab-case enforcement, em/en dash detection, deprecated-API scans, and Python syntax checks for `mcp-server/`. +3. **Open a PR** against `main` with a clear title and summary of changes. Use a conventional commit prefix (`feat:`, `fix:`, `docs:`, `chore:`). +4. **Respond to review** feedback; CI must pass before merge. + +## Developer Certificate of Origin and Inbound License Grant + +This project uses CC-BY-NC-ND-4.0 as its outbound license, which forbids derivatives. Every pull request is a derivative. Contributions are accepted inbound under a broader grant via the Developer Certificate of Origin (DCO), which resolves the conflict so the project can accept and redistribute contributions. + +### Required grant + +By submitting a contribution to this repository, you certify that you have the right to do so under the Developer Certificate of Origin (DCO) 1.1, and you grant TMHSDigital a perpetual, worldwide, non-exclusive, royalty-free, irrevocable license to use, reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute your contribution under the project's current license (CC-BY-NC-ND-4.0) or any successor license chosen by the project. + +### DCO sign-off + +Every commit in a pull request must have a `Signed-off-by:` trailer matching the commit author: + +``` +Signed-off-by: Jane Developer +``` + +Signing is done at commit time: + +```bash +git commit -s -m "feat: add new skill" +``` + +The GitHub DCO App enforces this on every PR. + +For the full inbound/outbound model and rationale, see [`standards/licensing.md`](https://github.com/TMHSDigital/Developer-Tools-Directory/blob/main/standards/licensing.md) in the Developer-Tools-Directory meta-repo. diff --git a/README.md b/README.md index 570d4fa..92df9cf 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@

License: CC BY-NC-ND 4.0 - Version + Version GitHub stars docs online

diff --git a/mcp-server/data/lifecycle_order.json b/mcp-server/data/lifecycle_order.json index 108833c..79d232a 100644 --- a/mcp-server/data/lifecycle_order.json +++ b/mcp-server/data/lifecycle_order.json @@ -2,175 +2,217 @@ { "method": "Awake", "phase": "Initialization", - "description": "Called when the script instance is loaded. Used to initialize variables and references between scripts. Called even if the component is disabled.", + "description": "MonoBehaviour.Awake callback.", "runs_per_frame": false, "thread": "main" }, { "method": "OnEnable", "phase": "Initialization", - "description": "Called when the object becomes enabled and active. Called immediately after Awake on first load, and each time the component is re-enabled.", + "description": "MonoBehaviour.OnEnable callback.", "runs_per_frame": false, "thread": "main" }, { "method": "Reset", "phase": "Initialization", - "description": "Called in the editor only when the script is first attached or when Reset is selected in the context menu. Used to initialize default values.", + "description": "MonoBehaviour.Reset callback.", "runs_per_frame": false, "thread": "main" }, { "method": "Start", "phase": "Initialization", - "description": "Called before the first frame update, only if the script instance is enabled. Called after all Awake calls. Use for setup that depends on other objects being initialized.", + "description": "MonoBehaviour.Start callback.", "runs_per_frame": false, "thread": "main" }, { "method": "FixedUpdate", "phase": "Physics", - "description": "Called at a fixed time interval (default 0.02s). Used for physics calculations and Rigidbody manipulation. Independent of frame rate.", + "description": "MonoBehaviour.FixedUpdate callback.", "runs_per_frame": true, "thread": "main" }, { "method": "OnTriggerEnter", "phase": "Physics", - "description": "Called when a Collider enters a trigger collider attached to this object. Requires at least one object to have a Rigidbody.", + "description": "MonoBehaviour.OnTriggerEnter callback.", "runs_per_frame": false, "thread": "main" }, { "method": "OnTriggerStay", "phase": "Physics", - "description": "Called once per physics update for every Collider that is touching a trigger. Can fire multiple times per frame during physics catch-up.", + "description": "MonoBehaviour.OnTriggerStay callback.", "runs_per_frame": true, "thread": "main" }, { "method": "OnTriggerExit", "phase": "Physics", - "description": "Called when a Collider stops touching a trigger collider attached to this object.", + "description": "MonoBehaviour.OnTriggerExit callback.", "runs_per_frame": false, "thread": "main" }, { "method": "OnCollisionEnter", "phase": "Physics", - "description": "Called when a collision between two non-trigger colliders begins. Provides ContactPoint data for the impact.", + "description": "MonoBehaviour.OnCollisionEnter callback.", "runs_per_frame": false, "thread": "main" }, { "method": "OnCollisionStay", "phase": "Physics", - "description": "Called once per physics update while two non-trigger colliders remain in contact.", + "description": "MonoBehaviour.OnCollisionStay callback.", "runs_per_frame": true, "thread": "main" }, { "method": "OnCollisionExit", "phase": "Physics", - "description": "Called when a collision between two non-trigger colliders ends.", + "description": "MonoBehaviour.OnCollisionExit callback.", "runs_per_frame": false, "thread": "main" }, { "method": "Update", "phase": "Game Logic", - "description": "Called once per frame. The main function for per-frame game logic. Frame rate dependent - use Time.deltaTime for consistent behavior.", + "description": "MonoBehaviour.Update callback.", "runs_per_frame": true, "thread": "main" }, { "method": "LateUpdate", "phase": "Game Logic", - "description": "Called once per frame after all Update calls. Commonly used for camera follow logic and any processing that should happen after movement is complete.", + "description": "MonoBehaviour.LateUpdate callback.", "runs_per_frame": true, "thread": "main" }, { "method": "OnAnimatorMove", "phase": "Animation", - "description": "Called at each frame after the state machines and animations have been evaluated but before OnAnimatorIK. Used to apply root motion manually.", + "description": "MonoBehaviour.OnAnimatorMove callback.", "runs_per_frame": true, "thread": "main" }, { "method": "OnAnimatorIK", "phase": "Animation", - "description": "Called after the Animator has computed its final IK state. Used for setting up IK goals and weights for procedural animation.", + "description": "MonoBehaviour.OnAnimatorIK callback.", "runs_per_frame": true, "thread": "main" }, { - "method": "OnGUI", + "method": "OnPreCull", "phase": "Rendering", - "description": "Called multiple times per frame for GUI event processing. Legacy IMGUI system - prefer UI Toolkit or uGUI for new projects.", + "description": "MonoBehaviour.OnPreCull callback.", "runs_per_frame": true, "thread": "main" }, { - "method": "OnDrawGizmos", + "method": "OnBecameVisible", + "phase": "Rendering", + "description": "MonoBehaviour.OnBecameVisible callback.", + "runs_per_frame": false, + "thread": "main" + }, + { + "method": "OnBecameInvisible", + "phase": "Rendering", + "description": "MonoBehaviour.OnBecameInvisible callback.", + "runs_per_frame": false, + "thread": "main" + }, + { + "method": "OnWillRenderObject", "phase": "Rendering", - "description": "Called every frame in the editor when the object is visible. Used to draw debug visualization gizmos in the Scene view.", + "description": "MonoBehaviour.OnWillRenderObject callback.", "runs_per_frame": true, "thread": "main" }, { - "method": "OnDrawGizmosSelected", + "method": "OnPreRender", "phase": "Rendering", - "description": "Called every frame in the editor only when the object is selected. Used for selection-specific debug visualizations.", + "description": "MonoBehaviour.OnPreRender callback.", "runs_per_frame": true, "thread": "main" }, { - "method": "OnApplicationPause", - "phase": "Application", - "description": "Called when the application pauses or resumes (e.g., losing focus on mobile). Receives a bool indicating pause state.", - "runs_per_frame": false, + "method": "OnRenderObject", + "phase": "Rendering", + "description": "MonoBehaviour.OnRenderObject callback.", + "runs_per_frame": true, "thread": "main" }, { - "method": "OnApplicationFocus", - "phase": "Application", - "description": "Called when the application gains or loses focus. Receives a bool indicating focus state. On mobile, maps to app foregrounding.", + "method": "OnPostRender", + "phase": "Rendering", + "description": "MonoBehaviour.OnPostRender callback.", + "runs_per_frame": true, + "thread": "main" + }, + { + "method": "OnRenderImage", + "phase": "Rendering", + "description": "MonoBehaviour.OnRenderImage callback.", + "runs_per_frame": true, + "thread": "main" + }, + { + "method": "OnGUI", + "phase": "GUI", + "description": "MonoBehaviour.OnGUI callback.", + "runs_per_frame": true, + "thread": "main" + }, + { + "method": "OnDrawGizmos", + "phase": "Editor", + "description": "MonoBehaviour.OnDrawGizmos callback.", + "runs_per_frame": true, + "thread": "main" + }, + { + "method": "OnDrawGizmosSelected", + "phase": "Editor", + "description": "MonoBehaviour.OnDrawGizmosSelected callback.", "runs_per_frame": false, "thread": "main" }, { - "method": "OnDisable", - "phase": "Decommissioning", - "description": "Called when the behaviour becomes disabled. Also called when the object is destroyed or the scene is unloaded. Pair with OnEnable for event cleanup.", + "method": "OnApplicationPause", + "phase": "Application", + "description": "MonoBehaviour.OnApplicationPause callback.", "runs_per_frame": false, "thread": "main" }, { - "method": "OnDestroy", - "phase": "Decommissioning", - "description": "Called when the MonoBehaviour is destroyed. Only called on objects that have previously been active. Used for final cleanup of resources.", + "method": "OnApplicationFocus", + "phase": "Application", + "description": "MonoBehaviour.OnApplicationFocus callback.", "runs_per_frame": false, "thread": "main" }, { "method": "OnApplicationQuit", - "phase": "Decommissioning", - "description": "Called before the application quits. On mobile platforms this is unreliable - use OnApplicationPause instead for save logic.", + "phase": "Application", + "description": "MonoBehaviour.OnApplicationQuit callback.", "runs_per_frame": false, "thread": "main" }, { - "method": "OnBecameVisible", - "phase": "Rendering", - "description": "Called when the attached Renderer becomes visible by any camera. Useful for enabling expensive per-frame logic only when visible.", + "method": "OnDisable", + "phase": "Decommissioning", + "description": "MonoBehaviour.OnDisable callback.", "runs_per_frame": false, "thread": "main" }, { - "method": "OnBecameInvisible", - "phase": "Rendering", - "description": "Called when the attached Renderer is no longer visible by any camera. Use to disable expensive computation on off-screen objects.", + "method": "OnDestroy", + "phase": "Decommissioning", + "description": "MonoBehaviour.OnDestroy callback.", "runs_per_frame": false, "thread": "main" } diff --git a/rules/csharp-unity-conventions.mdc b/rules/csharp-unity-conventions.mdc index 9b69bb1..392ab1a 100644 --- a/rules/csharp-unity-conventions.mdc +++ b/rules/csharp-unity-conventions.mdc @@ -3,7 +3,7 @@ title: C# Unity conventions description: C# coding conventions for Unity development globs: ["**/*.cs"] alwaysApply: false -standards-version: 1.7.0 +standards-version: 1.9.0 --- # C# Unity conventions diff --git a/rules/monobehaviour-lifecycle.mdc b/rules/monobehaviour-lifecycle.mdc index f93c961..f028b55 100644 --- a/rules/monobehaviour-lifecycle.mdc +++ b/rules/monobehaviour-lifecycle.mdc @@ -3,7 +3,7 @@ title: MonoBehaviour lifecycle description: Correct usage of MonoBehaviour lifecycle methods globs: ["**/*.cs"] alwaysApply: true -standards-version: 1.7.0 +standards-version: 1.9.0 --- # MonoBehaviour lifecycle rules diff --git a/rules/naming-conventions.mdc b/rules/naming-conventions.mdc index 3c72036..9c10cb5 100644 --- a/rules/naming-conventions.mdc +++ b/rules/naming-conventions.mdc @@ -3,7 +3,7 @@ title: Unity naming conventions description: Naming conventions for Unity C# code globs: ["**/*.cs"] alwaysApply: true -standards-version: 1.7.0 +standards-version: 1.9.0 --- # Unity naming conventions diff --git a/rules/performance-rules.mdc b/rules/performance-rules.mdc index 47f0a84..b6492ad 100644 --- a/rules/performance-rules.mdc +++ b/rules/performance-rules.mdc @@ -3,7 +3,7 @@ title: Performance rules description: Performance optimization rules for Unity globs: ["**/*.cs"] alwaysApply: true -standards-version: 1.7.0 +standards-version: 1.9.0 --- # Unity performance rules diff --git a/rules/security-and-builds.mdc b/rules/security-and-builds.mdc index e397a91..2fe9a58 100644 --- a/rules/security-and-builds.mdc +++ b/rules/security-and-builds.mdc @@ -3,7 +3,7 @@ title: Security and builds description: Security and build configuration rules globs: ["**/*.cs", "**/*.json", "**/*.asset"] alwaysApply: false -standards-version: 1.7.0 +standards-version: 1.9.0 --- # Security and build rules diff --git a/rules/serialization-rules.mdc b/rules/serialization-rules.mdc index 3c3cc52..a4abea1 100644 --- a/rules/serialization-rules.mdc +++ b/rules/serialization-rules.mdc @@ -3,7 +3,7 @@ title: Serialization rules description: Unity serialization best practices globs: ["**/*.cs"] alwaysApply: false -standards-version: 1.7.0 +standards-version: 1.9.0 --- # Unity serialization rules diff --git a/rules/shader-conventions.mdc b/rules/shader-conventions.mdc index 08e3c45..f58926b 100644 --- a/rules/shader-conventions.mdc +++ b/rules/shader-conventions.mdc @@ -3,7 +3,7 @@ title: Shader conventions description: Conventions for Unity shader development globs: ["**/*.shader", "**/*.hlsl", "**/*.cginc", "**/*.shadergraph"] alwaysApply: false -standards-version: 1.7.0 +standards-version: 1.9.0 --- # Shader conventions diff --git a/rules/visual-scripting-conventions.mdc b/rules/visual-scripting-conventions.mdc index 36a1e19..975d97c 100644 --- a/rules/visual-scripting-conventions.mdc +++ b/rules/visual-scripting-conventions.mdc @@ -3,7 +3,7 @@ title: Visual scripting conventions description: Best practices for Unity Visual Scripting globs: ["**/*.asset"] alwaysApply: false -standards-version: 1.7.0 +standards-version: 1.9.0 --- # Visual scripting conventions diff --git a/skills/addressables-assets/SKILL.md b/skills/addressables-assets/SKILL.md index cbcc75e..b447ae6 100644 --- a/skills/addressables-assets/SKILL.md +++ b/skills/addressables-assets/SKILL.md @@ -2,7 +2,7 @@ title: Addressables and Asset Management description: Managing assets with the Addressables system for async loading, memory management, and remote content delivery. globs: ["**/*.cs", "**/*.asset"] -standards-version: 1.7.0 +standards-version: 1.9.0 --- # Addressables and Asset Management diff --git a/skills/animation-systems/SKILL.md b/skills/animation-systems/SKILL.md index 1265eb6..8e3f02f 100644 --- a/skills/animation-systems/SKILL.md +++ b/skills/animation-systems/SKILL.md @@ -2,7 +2,7 @@ title: Animation Systems description: Unity animation workflows including Animator Controller, Timeline, DOTween, and sprite animation for 2D. globs: ["**/*.cs", "**/*.controller", "**/*.anim", "**/*.playable"] -standards-version: 1.7.0 +standards-version: 1.9.0 --- # Animation Systems diff --git a/skills/audio-systems/SKILL.md b/skills/audio-systems/SKILL.md index d7d7eb4..11d0d73 100644 --- a/skills/audio-systems/SKILL.md +++ b/skills/audio-systems/SKILL.md @@ -2,7 +2,7 @@ title: Audio Systems description: Audio implementation patterns including AudioSource, AudioMixer, spatial audio, and audio management. globs: ["**/*.cs", "**/*.mixer"] -standards-version: 1.7.0 +standards-version: 1.9.0 --- # Audio Systems diff --git a/skills/ecs-dots/SKILL.md b/skills/ecs-dots/SKILL.md index 4dd6ae3..199674c 100644 --- a/skills/ecs-dots/SKILL.md +++ b/skills/ecs-dots/SKILL.md @@ -2,7 +2,7 @@ title: ECS and DOTS description: Entity Component System development with Unity Entities, Jobs, and Burst for high-performance simulation. globs: ["**/*.cs"] -standards-version: 1.7.0 +standards-version: 1.9.0 --- # ECS and DOTS diff --git a/skills/editor-scripting/SKILL.md b/skills/editor-scripting/SKILL.md index 8916be4..5544822 100644 --- a/skills/editor-scripting/SKILL.md +++ b/skills/editor-scripting/SKILL.md @@ -2,7 +2,7 @@ title: Editor Scripting description: Extending the Unity Editor with custom inspectors, editor windows, property drawers, gizmos, and Scene View overlays using UI Toolkit. globs: ["**/Editor/**/*.cs"] -standards-version: 1.7.0 +standards-version: 1.9.0 --- # Editor Scripting diff --git a/skills/input-systems/SKILL.md b/skills/input-systems/SKILL.md index 8b286ed..e7d9f50 100644 --- a/skills/input-systems/SKILL.md +++ b/skills/input-systems/SKILL.md @@ -2,7 +2,7 @@ title: Input Systems description: Input handling with the New Input System package and legacy Input Manager migration guidance. globs: ["**/*.cs", "**/*.inputactions"] -standards-version: 1.7.0 +standards-version: 1.9.0 --- # Input Systems diff --git a/skills/monobehaviour-patterns/SKILL.md b/skills/monobehaviour-patterns/SKILL.md index 01d90ce..a4c5cbf 100644 --- a/skills/monobehaviour-patterns/SKILL.md +++ b/skills/monobehaviour-patterns/SKILL.md @@ -2,7 +2,7 @@ title: MonoBehaviour Patterns description: Comprehensive guide to MonoBehaviour lifecycle, async patterns with Awaitable, and common Unity design patterns. globs: ["**/*.cs"] -standards-version: 1.7.0 +standards-version: 1.9.0 --- # MonoBehaviour Patterns diff --git a/skills/networking/SKILL.md b/skills/networking/SKILL.md index dbe4e3b..d0f4b73 100644 --- a/skills/networking/SKILL.md +++ b/skills/networking/SKILL.md @@ -2,7 +2,7 @@ title: Multiplayer Networking description: Multiplayer networking patterns with Netcode for GameObjects, Netcode for Entities, Mirror, and Photon Fusion. globs: ["**/*.cs"] -standards-version: 1.7.0 +standards-version: 1.9.0 --- # Multiplayer Networking diff --git a/skills/performance-optimization/SKILL.md b/skills/performance-optimization/SKILL.md index 4644a6e..a940329 100644 --- a/skills/performance-optimization/SKILL.md +++ b/skills/performance-optimization/SKILL.md @@ -2,7 +2,7 @@ title: Performance Optimization description: Unity-specific performance best practices for CPU, GPU, memory, and profiling tools. globs: ["**/*.cs"] -standards-version: 1.7.0 +standards-version: 1.9.0 --- # Performance Optimization diff --git a/skills/physics-2d-3d/SKILL.md b/skills/physics-2d-3d/SKILL.md index 70cd590..ad3aca9 100644 --- a/skills/physics-2d-3d/SKILL.md +++ b/skills/physics-2d-3d/SKILL.md @@ -2,7 +2,7 @@ title: Physics Systems (2D and 3D) description: Physics programming for both 2D and 3D Unity projects including collision, raycasting, layers, and rigidbody management. globs: ["**/*.cs"] -standards-version: 1.7.0 +standards-version: 1.9.0 --- # Physics Systems (2D and 3D) diff --git a/skills/platform-targeting/SKILL.md b/skills/platform-targeting/SKILL.md index c02f3d7..60eeba6 100644 --- a/skills/platform-targeting/SKILL.md +++ b/skills/platform-targeting/SKILL.md @@ -2,7 +2,7 @@ title: Platform Targeting description: Platform-specific compilation, scripting defines, build settings, and cross-platform considerations. globs: ["**/*.cs"] -standards-version: 1.7.0 +standards-version: 1.9.0 --- # Platform Targeting diff --git a/skills/project-setup/SKILL.md b/skills/project-setup/SKILL.md index 92a3a2a..ab9f171 100644 --- a/skills/project-setup/SKILL.md +++ b/skills/project-setup/SKILL.md @@ -2,7 +2,7 @@ title: Unity Project Setup description: Guide for creating and configuring Unity projects with recommended folder structure, assembly definitions, version control, and package management. globs: ["**/*.asmdef", "**/*.asmref", "**/ProjectSettings/**"] -standards-version: 1.7.0 +standards-version: 1.9.0 --- # Unity Project Setup diff --git a/skills/render-pipeline-detection/SKILL.md b/skills/render-pipeline-detection/SKILL.md index c585bcf..a2a9ec0 100644 --- a/skills/render-pipeline-detection/SKILL.md +++ b/skills/render-pipeline-detection/SKILL.md @@ -2,7 +2,7 @@ title: Render Pipeline Detection description: Detecting the active render pipeline (URP, HDRP, or Built-in) and adapting code, shaders, and settings accordingly. globs: ["**/*.cs", "**/*.shader", "**/*.shadergraph"] -standards-version: 1.7.0 +standards-version: 1.9.0 --- # Render Pipeline Detection diff --git a/skills/scriptableobjects/SKILL.md b/skills/scriptableobjects/SKILL.md index 0514a22..56a3f93 100644 --- a/skills/scriptableobjects/SKILL.md +++ b/skills/scriptableobjects/SKILL.md @@ -2,7 +2,7 @@ title: ScriptableObject Architecture description: Data-driven design patterns using ScriptableObjects for events, variables, runtime sets, and configuration. globs: ["**/*.cs", "**/*.asset"] -standards-version: 1.7.0 +standards-version: 1.9.0 --- # ScriptableObject Architecture diff --git a/skills/shader-development/SKILL.md b/skills/shader-development/SKILL.md index 5544485..aa265ba 100644 --- a/skills/shader-development/SKILL.md +++ b/skills/shader-development/SKILL.md @@ -2,7 +2,7 @@ title: Shader Development description: Shader creation with Shader Graph, HLSL, and ShaderLab for URP and HDRP projects. globs: ["**/*.shader", "**/*.hlsl", "**/*.cginc", "**/*.shadergraph"] -standards-version: 1.7.0 +standards-version: 1.9.0 --- # Shader Development diff --git a/skills/testing/SKILL.md b/skills/testing/SKILL.md index 4c925f5..266c4fe 100644 --- a/skills/testing/SKILL.md +++ b/skills/testing/SKILL.md @@ -2,7 +2,7 @@ title: Unity Testing description: Unity Test Framework usage for Edit Mode and Play Mode tests with async Awaitable support. globs: ["**/Tests/**/*.cs", "**/*Tests*.cs", "**/*Test*.cs"] -standards-version: 1.7.0 +standards-version: 1.9.0 --- # Unity Testing diff --git a/skills/ui-development/SKILL.md b/skills/ui-development/SKILL.md index 4906746..c93dcf8 100644 --- a/skills/ui-development/SKILL.md +++ b/skills/ui-development/SKILL.md @@ -2,7 +2,7 @@ title: UI Development description: Building user interfaces with UI Toolkit (primary) and Canvas/UGUI, including data binding, styling, and responsive layouts. globs: ["**/*.cs", "**/*.uxml", "**/*.uss", "**/*.prefab"] -standards-version: 1.7.0 +standards-version: 1.9.0 --- # UI Development diff --git a/skills/visual-scripting/SKILL.md b/skills/visual-scripting/SKILL.md index 08b242a..e6c6fbc 100644 --- a/skills/visual-scripting/SKILL.md +++ b/skills/visual-scripting/SKILL.md @@ -2,7 +2,7 @@ title: Visual Scripting description: Unity Visual Scripting guidance for Script Graphs, State Graphs, Subgraphs, and custom units. globs: ["**/*.asset"] -standards-version: 1.7.0 +standards-version: 1.9.0 --- # Visual Scripting