Auto UI Toolkit Generator eliminates repetitive boilerplate when working with UI Toolkit.Working with Unity's UI Toolkit often means writing the same root.Q("my-button") calls and hard-coding CSS class strings over and over.Auto UI Toolkit Generator automates this process.Every time you save or import a UXML or USS file, the tool generates a corresponding C# class that wraps all named elements.Your code gains type safe references with IntelliSense support, minimal and configurable runtime overhead depending on the selected binding mode.USS bindings support both flat and BEM structured output.An optional Global Style Registry aggregates every USS binding in the project into a single UIStyles class for project-wide access.The generator integrates into your workflow through Project Settings, Unity's asset pipeline (auto-generation on import/move/delete), and dedicated menu items under Window → UI Toolkit.A sanitize pass removes generated files whose source assets no longer exist, keeping your project clean automatically.More information can be found in the technical details or in the documentation.> UXML FilesGenerates strongly-typed C# binding classes from UXML filesNamed elements become typed properties (e.g. Button, Label, custom [UxmlElement] types)Supports hierarchical (nested) access to child elements via generated wrappersThree binding styles:OnCreate: all elements queried once in constructor, best performanceLazyLoaded: elements are queried on first access and cachedProxy: requeried on every accessUXML element names should be unique for generation. Duplicate names may be ignored or lead to missing bindings.> USS FilesGenerates USS style constant classes from .uss filesSupports flat and BEM-structured output with nested static classes per block/element/modifierOptional helper methods (Add, Remove, Toggle, SetModifier) generated alongside each style classOptional Global Style Registry (UIStyles) aggregating all USS bindings into one central access pointUSS class names must be unique after C# name conversion, If multiple USS classes resolve to the same generated C# identifier, a compilation error will occur.🔗Shared FeaturesClear summaries in generated code for ease of useAutomatic generation triggered by Unity's asset postprocessor on import, move, and deleteSettings page integrated directly in Project Settings → UI Toolkit → Binding GeneratorPer folder ignore list to exclude third-party or generated assetsManual generation via Project Settings or Context Menu on individual assetsSanitize commands to remove orphaned generated filesConfigurable output directories, namespaces, and class names🏆OverviewEditor tooling only, generated bindings are safe for runtime use and have no impact on build size beyond the generated codeClean code with commentsTested to work out of the box for standard UI Toolkit workflowsAI was used for best practices to maximize the performance of the asset and during the writing of the code to maintain the cleanliness of the created project.Cover images was boosted with AI.



