Why use statically typed Tags or Layers?
Using typed tags and layers in your project's code provides compile-time checking of the tag and layer values. Using the included Tag or Layer attributes on a string or int property respectively also allows you to adjust these values in the inspector. See examples below.
Whats wrong with UnityEngine.LayerMask?
Nothing! The generated types are designed to augment the usage of Unity's LayerMask struct. The LayerMask struct provides methods for converting a layer from a string into its corresponding ID (int) and vice versa. However, both approaches require you to use 'magic strings' in your code. Using typed values for both the layer id and the mask allows you to catch errors at compile time. The layer type also contains pre-computer masks for each layer, making it simple to create layer masks from the types.
## [3.0.1] - 2021-04-05
- Exposing more classes and featues.
## [3.0.0] - 2021-04-05
- Stabilized Public API.
## [2.0.3] - 2021-04-04
- Fix stray import statement.
## [2.0.2] - 2021-04-04
- Further refactoring, along with some new public interfaces for further extension.
## [2.0.1] - 2021-04-04
- Massive refactoring. Code should be a little easier to navigate.
## [2.0.0] - 2021-04-03
- Generate types for both tags and layers (Layers were previous Enums).
- Introduced TagAttribute and LayerAttribute which can be applied to any 'int' or 'string' property.
## [1.0.7] - 2021-04-02
- Improved validation.
- Fixes regression in nested namespaces.
## [1.0.6] - 2021-04-02
- Fixed bug in layer names with spaces.
- Fixed settings getting "stuck".
- Show less warnings during normal operation.
## [1.0.5] - 2021-04-02
- Validate earlier that settings will not create invalid identifiers in the generated code.
## [1.0.4] - 2021-04-01
- Moved Project Settings path to 'Project/Tags and Layers/Automatic Type Generation'.
## [1.0.3] - 2021-04-01
- Moved Project Settings path to 'Alkimee Games'.
- Cleaned up documentation.
## [1.0.2] - 2021-04-01
- Added example use cases of both the generated Tag and Layer types.
## [1.0.1] - 2021-04-01
- Bumped minimum required Unity version to 2018.4.33f1.
- Added package to [OpenUPM](https://openupm.com/packages/com.alkimeegames.taglayertypegenerator/).
- Added [documentation](https://github.com/AlkimeeGames/TagLayerTypeGenerator/blob/develop/Documentation~/API.md) on how to extend the generator classes.
- Fixed C# 6 compatibility for older Unity versions.
- Fixed compatibility with experimental version of UnityEngine.UIElements.
- Fixed Assembly Definition referencing itself.
## [1.0.0] - 2021-03-31
- Initial release.