Prompt file imported from cptjamestiberiouskirk-pixel/starflight-unity-port (
.github/prompts/fixandverify.prompt.md). Copyright stays with the author.
Scan all C# files for Unity compilation errors, fix each error, then verify fixes work correctly.
Fix-Verify Loop
- Get all current errors using Problems panel
- Fix each error with minimal changes
- Wait for Unity recompilation
- Check for remaining/new errors
- Repeat until clean (max 5 iterations)
Requirements
- Scan all .cs files and identify compilation errors
- Fix each error following Unity C# best practices
- After applying fixes, save all files
- Wait 5 seconds for Unity auto-compilation
- Check if any errors remain or new errors appeared
- If errors exist, analyze and fix them
- Repeat the fix-verify cycle until Unity Console is clean
- Add missing using statements (UnityEngine, System.Collections, etc.)
- Fix null reference and type mismatch errors
- Verify GetComponent() patterns are correct
Constraints:
- Maintain Unity naming conventions (match the file you are editing:
m_fields andc_constants in legacy code,_camelCaseprivate fields in the newer code; see.github/copilot-instructions.md) - Don't modify Unity-generated files in Library/ or Temp/
- Preserve existing code architecture and patterns
- Keep fixes minimal and targeted
- Maximum 5 fix-verify iterations to prevent infinite loops
Success criteria:
- All compilation errors are resolved
- No new errors introduced by fixes
- Unity Console shows zero compilation errors
- Report detailed summary:
- Total errors fixed
- Files modified with line numbers
- Number of fix iterations required
- Confirmation that Unity compiles successfully
