You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Feature: check_code tool to flag deprecated and anti-pattern Unity APIs with line numbers #39
deprecated_patterns.json already maps legacy APIs to replacements, but it is only used as a side-warning in lookup_api. Developers upgrading to Unity 6 (or AI agents reviewing code) want "scan this file and tell me what to change". That is concrete, high-value, and easy to demo.
Proposal
New MCP tool check_code(code | file_path):
Regex/token match against deprecated_patterns.json plus new Unity 6 renames (velocity -> linearVelocity, drag -> linearDamping, FindObjectsOfType -> FindObjectsByType, CGPROGRAM in URP, Camera.main in Update, GetComponent in Update, GameObject.Find in hot paths, async void outside event handlers, new WaitForSeconds in loops).
Returns line numbers, the replacement, and a reason, optionally with a suggested patch.
Extend the data schema with pattern (regex), severity, autofix.
Stretch: ship the same patterns as a Roslyn analyzer package for Unity, so the checks run in the editor and CI too.
Done when
check_code flags every pattern in a fixture file with correct line numbers, and the performance-optimization and csharp rules point the agent at it.
Activity