ai-agent-unity-rules
Common-ka · Common-ka/ai-agent-unity-rules
Cung cấp các quy tắc cấu hình AI sẵn sàng cho sản xuất cho các dự án Unity 6.2+, hỗ trợ phổ biến cho Cursor IDE và Google Antigravity với quy trình tự động đồng bộ hóa.
🎮 Các rule AI sẵn sàng cho sản xuất dành cho Unity 6.2+. Nguồn đáng tin cậy duy nhất cho Cursor (.cursor) và Google Antigravity (.agent) với quy trình làm việc tự động đồng bộ.
Xem trước
Bạn có thể làm gì với nó
- Triển khai các tiêu chuẩn viết code AI nhất quán trên các dự án Unity bằng Cursor.
- Tự động đồng bộ hóa các quy tắc tác nhân AI giữa Cursor và Google Antigravity.
- Tận dụng AI để phát triển game C# với các thực tiễn tốt nhất được xác định trước.
Kiểm tra an toàn
Không thấy dấu hiệu rủi ro trong các file đã quét.
Quét tự động các file trong repo. Luôn xem lại code trước khi chạy.
Trích từ README
Unity AI Agent Rules (Cursor + Antigravity)
📋 Description
The Single Source of Truth for Unity AI assistance.
This repository provides production-ready configuration rules for Unity 6.2+ projects. It is designed to be universal, automatically supporting both:
- Cursor IDE (via native
.mdcformat) - Google Antigravity (via synced
.agent/rulesformat)
We use a "write once, deploy everywhere" approach: rules are defined in Cursor's format and automatically converted for Antigravity Workspace using a custom CI/CD workflow.
🚀 Quick Start
Requirements
- Unity 6.2 or higher
- IDE: Cursor IDE OR Google Antigravity Workspace
- .NET SDK for C# development
Installation
Option A: Automatic Setup (Recommended)
Simply clone this repository into the root of your Unity project. The AI agents will automatically detect their respective configuration folders.
cd YourUnityProject
git clone https://github.com/Common-ka/ai-agent-unity-rules.git
Option B: Manual Setup
For Cursor Users:
- Copy the
.cursor/folder to your project root. - Copy
.vscode/settings.jsonto your project's.vscode/folder.
For Antigravity Users:
- Copy the
.agent/folder to your project root. - Ensure
.agent/rules/contains the.mdfiles.
🛠 How it Works (Sync Workflow)
This repository uses a Uni-Directional Data Flow to keep rules in sync.
graph LR
A[.cursor/rules/*.mdc] -- python script --> B(.agent/rules/*.md)
- Source: Rules are authored in
.cursor/rules/using the modern.mdcformat. - Sync: A Python script (
sync_rules.py) automatically converts these files into standard Markdown for Antigravity. - Automation: A GitHub Action runs on every push to ensure
.agent/rulesare always up to date.
📄 License
MIT License - see LICENSE