Skip to content

Visual Customization

anderspetruschke edited this page Jul 10, 2022 · 2 revisions

Overview

With Visual Customization, you can add different models and material assignments to any object and switch between their different styles during runtime. There are some default "Themes", which are are a collection of all the selected styles for all objects. Users can also create their own Themes with an in app menu, and switch between them at any time.

Switching between and creating your own Themes during runtime

You can open the visual Customization menu from within the main menu and see a list of all themes. Here you can choose to select one of them, create a new one from scratch, or modify an existing Theme.

Screenshot1

Add styles to Objects in Unity

To add Styles to a new Object, you need the VisualStyle and VisualStyleLoader scripts. Attach the VisualStyleLoader to an empty Gameobject inside of your object. Then Add an Empty Gameobject with the VisualStyle script for each different Model you want to add. These will be switched on and off, depending on which style is selected. Add different variants, that switch up materials, by using the buttons inside of the VisualStyle component or add Renderers and their Materials manually. Add key values to all of your Components and variants. These will be used to uniquely identify each style and its variations.

Once you're done, go back to your VisualStyleLoader, select the configuration file from the Assets as the configuration and press the "Find Styles" Button to link up the Style scripts inside of the children. Then press the "Register Styles" button and your newly Created Style will be added inside of the configuration file. Now you can create Themes with your style from inside the application, or add them manually to a default style inside of the configuration file.

Screenshot 2022-07-10 221739 Screenshot 2022-07-10 221715 Screenshot 2022-07-10 221832

Clone this wiki locally