Customization

Theme Config Asset

The Theme Config Asset is the heart of customization in ZoboUI. It's the central hub for configuring your theme, utilities, and a host of other settings such as generating and purging USS files, as well as importing and exporting configurations.

Creating a Theme Config Manager Asset

To begin customizing your theme, you'll first need to create a Theme Config Manager asset in your Unity project.

  1. Create the Asset: Navigate to Assets > Create > ZoboUI > Theme Config Manager in the Unity Editor. This action creates a new Theme Config Manager asset.
  2. Select the Asset: Locate and select the Theme Config Manager asset in the Project window.
  3. Configure USS Generation: In the Inspector window, find the USS Generation section under Settings. This is where you can specify the output path for the generated USS file. By default, it is set to Assets/Styles/generated.uss, but you can modify this path as needed.
  4. Generate the USS File: With the Theme Config Manager asset selected, press the Generate button in the Inspector window to create your USS file.

Utilizing the Theme Config Asset

Once you have your Theme Config Manager asset set up, it becomes the go-to place for making adjustments and tuning the appearance of your UI. From setting up your color schemes and defining spacing to managing plugins and more, the Theme Config Asset puts comprehensive control at your fingertips.

Generating and Purging USS Files

Beyond just configuration, the Theme Config Asset also provides tools for maintaining your stylesheets:

  • Generate USS: Whenever you make changes to your theme configuration, you can regenerate the USS file to apply these changes across your project.
  • Purge Unused Classes: To optimize your project, you can purge any unused utility classes, ensuring that your stylesheet is lean and efficient.

Exporting and Importing Configurations

Sharing and reusing configurations between projects is made easy with the export and import features. You can quickly export your current settings to a JSON file or import settings from another project, enabling consistent styling across different projects.

Flexibility in Asset Placement

Feel free to organize your project's assets to suit your workflow. The Theme Config Asset can be placed anywhere within the Assets folder of your Unity project. This allows you to keep your project neat and maintain a structure that aligns with your development practices. Just remember that if you move the asset, you should update any references to its new location within your project settings or scripts.


The Theme Config Asset is an indispensable tool in ZoboUI, providing a powerful and user-friendly interface for managing the look and feel of your Unity project's UI with precision and ease.

Previous
Reusability
Next
Prefix