Skip to content

Automatically generates an enum representing all layers in your Unity project

License

Notifications You must be signed in to change notification settings

dmitrybaltin/LayersEnumGenerator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Layer Enum Generator for Unity

This Unity Editor tool automatically generates an enum based on your project's layers.
It updates the enum whenever layers are modified and ensures the file is regenerated if missing or empty.

Features

  • Auto-generates enum for all layers with their index values.
  • Customizable settings: Adjust output path, namespace, and enum name.
  • Automatic updates: Regenerates the enum when layers are changed.

Usage

  1. Open Settings: Tools > Layer Auto Generator Settings to customize output path, namespace, and enum name.
  2. Generate Enum: Tools > Generate Layers Enum to create or update the enum.
  3. Auto-regeneration: The enum is automatically regenerated when the layer configuration changes.

Installation

  1. Download or clone the script into your Unity project's Editor folder.
  2. Access it from the Tools menu in Unity.

License

This tool is open-source under the MIT License.

About

Automatically generates an enum representing all layers in your Unity project

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages