unity-cursor-ai-c-cursorrules-prompt-file — Cursor rule for Unity
A Cursor rule that briefs the assistant on a Unity game project in C#: modular code, responsive mechanics, real-time performance.
.cursor/rules/unity-cursor-ai-c-cursorrules-prompt-file.mdcWhat unity-cursor-ai-c-cursorrules-prompt-file does
The file carries project context for a tower defense game driven by a Nintendo Ringcon, where players place turrets and charge them through exercise. The codebase is mid-refactor for extensibility and maintainability, and the rule keeps that in front of the assistant on every edit.
Inside are a few instructions: mechanics should feel intuitive and responsive, performance gets tuned for real-time gameplay, and code stays modular so new features do not break old ones. The project language is C#, Unity version 2021.3.18f1. Point this at a different Unity version or a different genre and some of the guidance will miss — it was written for one specific repository, not for Unity in general.
Install is a single file at .cursor/rules/unity-cursor-ai-c-cursorrules-prompt-file.mdc. The **/* glob with alwaysApply: false means it does not attach itself: you pull it in when you are working on gameplay.
What it helps with
- keep the assistant aware of a Unity project's context
- remind the model about modular structure during refactoring
- set a performance target for real-time gameplay
- pin the Unity version and language in AI prompts
- describe Nintendo Ringcon input so the model does not assume keyboard controls
Example prompts for the agent
- read the unity-cursor-ai-c-cursorrules-prompt-file rule and suggest how to split this class into modules
- given the project context, how do I optimize turret updates for real-time gameplay
- check my C# code against the instructions in the Unity rule
How to install unity-cursor-ai-c-cursorrules-prompt-file
Manually: put the files in place
.cursor/rules/unity-cursor-ai-c-cursorrules-prompt-file.mdcFrontmatter: description, globs, alwaysApply
Manually: put the files in place
.claude/rules/unity-cursor-ai-c-cursorrules-prompt-file.mdThe paths frontmatter field limits the files: move globs from the source into paths
AGENTS.md
Codex reads AGENTS.md: paste the rule text there
Manually: put the files in place
.github/instructions/unity-cursor-ai-c-cursorrules-prompt-file.instructions.mdThe applyTo field sets which files it applies to: move globs from the source into applyTo
Manually: put the files in place
.devin/rules/unity-cursor-ai-c-cursorrules-prompt-file.mdManually: put the files in place
.clinerules/unity-cursor-ai-c-cursorrules-prompt-file.mdStep by step, with commands for each platform: Cursor rules: .mdc files, four modes and what replaced .cursorrules
Questions about unity-cursor-ai-c-cursorrules-prompt-file
How do I install unity-cursor-ai-c-cursorrules-prompt-file in Cursor?
Create .cursor/rules/unity-cursor-ai-c-cursorrules-prompt-file.mdc in your project root and paste the rule contents into it.
What does this rule do?
It gives Cursor context for a Unity project: a tower defense game controlled by a Nintendo Ringcon, C# as the language, Unity 2021.3.18f1, plus modularity and performance expectations.
Does the rule apply to every file automatically?
No. The **/* glob covers all files, but alwaysApply: false means you attach it manually when you need it.
Source text
unity-cursor-ai-c-cursorrules-prompt-file.mdc · CC0-1.0
--- description: "Cursor rules for Unity development with C# integration." globs: **/* alwaysApply: false --- // Unity Tower Defense Game using Nintendo Ringcon // This project involves creating a tower defense style game controlled by a Nintendo Ringcon. // Project Context // Players place turrets and use exercise to charge them up. // The project is currently undergoing refactoring for better extensibility and maintainability. // Development Environment // Language: C# // Unity Version: 2021.3.18f1 // Instructions // Ensure the game mechanics are intuitive and responsive. // Focus on optimizing performance for real-time gameplay. // Implement modular code structure for easy updates and feature additions. // Additional Notes // Feel free to ask questions if you need more information about the project intentions.
© PatrickJS · CC0-1.0 · PatrickJS/awesome-cursorrules