Editor-only Unity tool that generates type-safe constants and helpers from project data, replacing magic strings with compile-safe code and safer workflows.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.Unity 2022.3 LTS+ editor-only packageGenerates type-safe C# code from Unity project dataNo runtime dependency on ConstSafe in generated outputBuilt-in generators for Tags, Layers, Sorting Layers, Scenes, Legacy Input Axes, Animator Parameters, Shader Properties, Resources, and Defined StringsOptional package-gated generators for Addressables and New Input SystemResources output includes path constants and generated load helpersAnimator output includes names, typed IDs, and default valuesShader output includes property names and pre-hashed IDsSupports editor-authored definition sources for custom constant setsSupports public custom generators for advanced extensibilityAutomatic stale detection and debounced regeneration workflowRegenerate All and Regenerate Selected actionsPreview window for generated output before inspectionOrphan output detection and safe cleanup toolsFirst-run welcome window and importable samples includedDesigned to compile cleanly without optional packages installedGenerated code is deterministic and intended for source control useAI was used for development for code review, debugging assistance, documentation drafting.

