ConstSafe is a Unity editor extension that scans project data and generates readable C# code for the places where magic strings usually cause bugs. Instead of hardcoding tags, scene names, resource paths, animator parameter names, shader property names, and similar values, you reference generated constants and IDs from code.
It is designed to be practical, lightweight, and safe to integrate into existing projects. Generated output has no runtime dependency on ConstSafe itself, so the generated code remains usable even if the package is later removed. ConstSafe also includes preview, selective regeneration, stale detection, onboarding, and orphan cleanup to make the workflow reliable in day-to-day use.
Built-in support includes tags, layers, sorting layers, scenes, legacy input axes, animator parameters, shader properties, resources, and editor-authored defined strings. Optional package support is included for Addressables and the New Input System. These integrations stay hidden unless the matching Unity package is installed, so the core package stays clean and does not force unnecessary dependencies.
ConstSafe is genre-agnostic and fits any Unity project that wants safer references and cleaner code, from prototypes to larger productions. It is also customizable: you can add your own editor-authored defined strings for simple use cases, or create full custom generators for advanced pipelines and team-specific workflows.
Best practice: use version control before first regeneration or major output changes.