In the Unity 2019.1 update there was the addition of the UI Elements framework, which allows for more custom extensions of the Unity UI, and makes it easy for us to now make our own windows/extensions/tools inside the engine, with specific styling.
Making a window means you need to basically know(or at least understand) UXML (Unity’s version of XML), USS (Unity’s version of CSS) and C#! It’s kind of like doing some web development inside Unity.
UXML – Window layout/Hierachy
USS – Style sheet
C# – Functionality
Unity made a blog post about it which has quite a bit of information on the topic here: https://blogs.unity3d.com/2019/04/23/whats-new-with-uielements-in-2019-1/
I’ve been delving into it to make some simple tools that could be used by artists to speed up their workflow. Here are some of those things in use:
Randomly Rotate Selected on Axis
I plan to add more to this, including a min-max amount, and a toggle for local or world space.
Fill Vertex Colours
This one creates an instance of the selected meshes, and fills them with the vertex colour that you select.
This tool fills the selected meshes with the material that is selected. I know this can be done in the Unity editor already when you select multiple, but it was a good test to access and change a game objects components.
Select By Material
This tool loops through all of the game objects in the scene, checks if they have a
mesh renderer, and then checks to see if the material is equal to the one the user set for the search. It then swaps your active selection to this array of game objects.