UI Customizations
About UI customizations.
Last updated
About UI customizations.
Last updated
All of Inventool's UI is created with the UI Toolkit (UI Builder). This can either be good or bad, depending on your knowledge of the system. The UI Toolkit is Unity's alternative UI building option, centered around VisualElements. Unlike the standard Unity UI, which is based on GameObjects, the UI Toolkit offers a different approach to creating user interfaces.
Unity has stated that they are actively investing in the UI Toolkit as the primary solution for both runtime and Editor UI development going forward. While the traditional Unity UI (based on GameObjects and the Canvas system) will continue to be supported, future enhancements and new features are focused on evolving the UI Toolkit.
Customizations can be made with the UI Builder. You can find all of Inventool's UI documents in Assets/StylishEsper/Inventool/UIToolkit
folder. Double on the UI document you'd like to edit. UI documents are .uxml files (the one with the </> icon). This will open the UI Builder window, and it's where you can make edits to the UI.
It may be important to follow the best practices below to ensure to errors occur.
Before opening the UI document (.uxml file) that you want to edit, make a copy of it (both its .uss and .uxml files). You can move it anywhere in your project. Open the .uxml copy and replace the previous .uss file with the new copy you created. The purpose of this is so that the original files remain as is in the case of something breaking. In your scene, provide the relevant Inventool UI component with the new .uxml file. At this point, you can make your edits in the copy files.
Do not change the names of the UI elements, as they are referenced in code with their names. If you create new UI elements, you can change their names as you'd like.
Frequently test your changes. When you make a change, enter play mode to ensure it looks good and nothing is broken.
Check out the video.