Unity Constants Generator
Generate type-safe constant classes for Tags, Layers, Sorting Layers, and Input axes at editor-time. This code generator eliminates magic strings and provides compile-time safety by automatically creating constant-declaration classes from your project's configuration, reducing runtime errors and improving code maintainability.
com.dogfuntom.unityconstantsgenerator 
Install via UPM
Add to Unity Package Manager using this URL
https://www.pkglnk.dev/unityconstantsgenerator.git#upm README Markdown
Copy this to your project's README.md
## Installation
Add **Unity Constants Generator** to your Unity project via Package Manager:
1. Open **Window > Package Manager**
2. Click **+** > **Add package from git URL**
3. Enter:
```
https://www.pkglnk.dev/unityconstantsgenerator.git#upm
```
[](https://www.pkglnk.dev/pkg/unityconstantsgenerator)README
This repository has UPM support. Use https://github.com/mob-sakai/UpmGitExtension for installing it directly in Unity.
Original author is dogfuntom
There's also my post: Russian or Auto-translated into English The post itself is not too helpful (it's faster to understand the code directly than to read a ton of words about it). But the criticism of my approach in comments is interesting and has valid points.
https://gist.github.com/dogfuntom/00faf9f3598d845b1a5c#gistcomment-3029375
unity-constants-generator
[Unity CodeDom] Editor-time code generator. Generates constant-declaration-only classes for Tags, Layers, Sorting layers and Input axes. Good for type-safety.
No comments yet. Be the first!