Upcoming Feature Highlight: Main Toolbar Customization

Today we’re highlighting an upcoming feature that the Scene Tooling team has been working on. Please keep in mind that the details outlined in this discussion post are subject to change, and we cannot share a release version at this time. We want to take your feedback into consideration.

The main toolbar provides several UI elements that are critical to the editor workflow and stays on your screen regardless of the window layout in your editor. Although there is a lot of unused real estate, the toolbar has largely stayed the same between iterations of the Unity Editor.

It has been widely requested to allow developers to extend the main toolbar with custom UI elements. Some clever users have discovered hacks to achieve this, but we would like to provide a robust ecosystem for customizing the main toolbar easily and safely. We want developers to leverage the main toolbar, organize it the way they want, and create presets for specific workflows such as level design or animation.

Rearrange Toolbar Elements


The main toolbar has been divided into three dock zones: the left, middle, and right. Toolbar elements can be rearranged and reordered.

Hide/Show Toolbar Elements

1600x300
Elements in the main toolbar can be hidden or shown.

Overflow

When the toolbar elements overflow the main toolbar, the toolbar will elegantly transform into a scroll zone.

Extend Toolbar with Custom Elements

We are exposing the API to extend the main toolbar. We have designed this API to be simple yet powerful, requiring minimal code and no knowledge of Unity’s UI stack. The API docs will include code examples demonstrating how to create both simple and complex elements for the main toolbar.

[MainToolbarElement("Build Settings")]
static MainToolbarElementInfo CreateBuildSettingsButton()
{
    return new MainToolbarButtonInfo(new GUIContent("Build Settings"), OpenBuildSettingsWindow);
}

Currently the API allows for the creation of buttons, dropdown menus, toggles, and groups of these elements. We want to release this initial version with a small set of UI element types and refine the overall user experience before considering additional types. If there are specific use cases you’d like to see supported by this API, please let us know.

Presets


Users can save and load presets to quickly switch between workflows. These can also be exported to be shared with other users.

Please keep in mind that the features outlined above are subject to change. We hope you enjoyed this preview, and we look forward to hearing your feedback.

18 Likes

This looks great! :slight_smile:

Personally, I would love to be able to override or modify the Play/Pause/Step buttons themselves. Sometimes I’ve wanted to swap out the functionality, like to make the Step button proceed one fixed step rather than a render frame (our game operates on a fixed step).

For the API, since this is on the critical Domain Reload path (it gets run every time scripts reload), the biggest thing is that this is ultra efficient. Domain Reload slowness is a death-by-1000 cuts situation, so it’s important that even the smaller APIs are efficient. For example, avoiding reflection when calling all of these handlers.

Will presets be separate from loadouts? Seems like something you guys could cram together to avoid bloat. Loadouts are so incredibly powerful and I think you guys should do more to promote them!

I’ve really enjoyed this in the Unity 6 beta, i’ve been able to close things I never use, but I wasn’t sure how to get those settings back… (aside from loading a loadout)

Wow, this looks amazing! Are there any planned changes to make these tabs more integrated, like in Blender or Godot, and using the skin color?
image

Also, regarding the new window-like system for dockable panels (as seen in the second image), I feel they could be slimmer or not require a title bar at all!
image

For example:
In this image, both side panels look good and can be hidden or shown as needed. However, the central panel serves as the “main” window, and if I hide it, everything gets hidden. It would be cool if we could hide the panels independently, regardless of whether the main window is open. Additionally, having the main title style similar to the new style but with the white elements in dark, integrated into the same space as the title bar, would be a nice touch, similar to the Unity UI concepts shown in 2019.

The UI concept from 2019 looked so simple and slim, making it more pleasant to the eyes. Is this UI style concept still being worked on?

2 Likes

Wow :open_mouth:
I’ve been thinking about this a few months ago, and this feels like the perfect way of doing it.
It’s the kind of little features that changes everything. I’m now fully convinced that Unity 6 is a big deal.
Any idea when we can expect this to land?

Honestly, the editor workflow improvements have been amazing lately. Big congrats to you and the rest of the team.

1 Like

Finally a good editor UX improvement… with api, already make use of one myself and is few different toolbar customization assets do similiar like Custom Toolbar | com.redwyre.custom-toolbar | Unity Package (UPM) | OpenUPM… but no good having it so fractured as other assets aren’t going utilize it and provide there own additional toolbars… atleast now officially supported everyone can provide customization for there asset to add to the toolbar… I mean I hope so, can’t come soon enough really.

Which version of U6 will this land in ?

Weirdly if only the people a MS would get a clue and do the same for Vscode Add an optional configurable toolbar below the menu · Issue #41309 · microsoft/vscode · GitHub with this ticket which has been around 6years with people asking for proper toolbar support and api.

1 Like

Thank you for your feedback. The option to override/modify the play mode buttons is something that has been requested multiple times and we have taken note of it.

We want to put this in the hands of our users as soon as we can, but at the moment we don’t have an ETA.

1 Like

Will presets be separate from loadouts? Seems like something you guys could cram together to avoid bloat. Loadouts are so incredibly powerful and I think you guys should do more to promote them!

If you meant layouts, they do currently save the state of the toolbar, so changing from one layout to another will change to the toolbar you saved in that layout. Presets are a quick way to change the toolbar only, without affecting the rest of your editor. We felt that both saved methods had their uses depending on your workflow but is subject to change if it ends up creating unnecessary bloat.

1 Like

Yeah, layouts!

As a huge fan of layouts it might do you guys some good to just combine this all together. It’s an existing feature that a lot of people don’t realize how powerful they are, and if you just combine the two you could have a more streamlined interface, and any tutorials for one would apply to the other and also UI revamps to make this or that feature more or less prominent.

I kinda get that SOME users might want to ONLY change the main toolbar, but chances are these are users who would benefit from the power of the layout switch too, it would be kinda like forcing them to understand an even better feature.

This sort of design philosophy would do the whole of Unity a lot of good. Instead of everything being independent and the UI getting bigger and bigger if everything were more “Unified” that would go a long way to reducing not just the volume of features and things that can go wrong, but get you guys thinking about the overall workflow and gear the UI around that.

My dream would be u guys make the layouts button a little more prominent maybe even give it some prime real-estate in the upper right of the main toolbar for super fast layout selection and to kinda infer that this is a dropdown that lets you adjust your “layout”. This is where it would get really crazy: include some an internal YouTube link right in the Unity editor right next to the layouts button that you could click and it would open an external window explaining the power of the feature.

This would be crazy to do for every feature in unity, but layouts are so underutilized and powerful that they could benefit from this. And if you were to combine these two features to have them saved here you could include the functionality of these Main Toolbar Customization in said tutorial too so it would be more exciting for people who already know about layouts. Ok maybe a little crazy and I’m sure lots of users would hate to have random YouTube videos popping up, but maybe you could tuck this away somewhere like at the bottom of the dropdown or something.

We spend a lot of time talking about cool new features for the future in regards to Unity, but there are so many awesome features already in Unity that many would be excited to learn about for the first time, or who don’t realize there are broader ranges of uses for existing features.

I wouldn’t be surprised if 70% or more of Unity users who do know about layouts don’t know that you can open a slew of inspector windows for tuning many things at once, save that layouts and have them all pop up referencing all those assets again without having to hunt them down again.

Would love to be able to bookmark some layouts as buttons so I wouldn’t have to use the dropdown as well.

One thing I thought you guys could add as a built in layout that would be handy is a built in “render settings” layout that maybe loaded up tabs for scene lighting, and various property menus that expose various build and post processing values. It would be a great example and useful example of the power of layouts. (unfortunately many render settings are on unique project assets that the user generates so you guys wouldn’t be able to include them, but I digress)

Here’s an example for anyone that isn’t aware, So it’s not JUST the sizing and positioning of inspectors and so forth, but which specific folders you have open, so in this example I have a specific project folder that holds a lot of bonuses that I need to work on as well as another project folder that I have locked and any time I need to work on these “bonus” assets, i can go into this layout and boom, everything is ready to go, no need to hunt around my projct for these folders. This is the sorta layout I use all the time and it would be nice to have a button for. I’m sure animators would appreciate these too for say swapping between the animation window or animator window. The use cases are endless.

Would love to be able to bookmark some layouts as buttons so I wouldn’t have to use the dropdown as well.

We’ve discussed potentially having an easier way to add any Menu Items in the toolbar. No concrete plans yet but it’s something we’ve been looking at. With the current API, you could do something like this to achieve what you want:

[MainToolbarElement("Layouts/MyLayout")]
static MainToolbarElementInfo CreateMyLayoutButton()
{
    return new MainToolbarButtonInfo(new GUIContent("My Layout"), () => EditorApplication.ExecuteMenuItem("Window/Layouts/MyLayout"));
}

With regards to the feedback on the broader design of the editor and layouts, I forwarded it to our UX designer.

2 Likes

Thanks so much! These improvements look fantastic, looking forward to maybe some of this stuff bleeding into other areas like the inspector and other menu items in the future. I might be reading into this too much, but It’s as if that main toolbar is a little window into the potential future of what the rest of the editor might be able to do with these news features.

Ship this in Unity 6.0!

If you’re concerned about breaking the private API that we’ve all been forced to hack into, consider this a vote to disregard that (well intentioned, but ultimately flawed) thinking and just release the proper API.

tldr: break my shit, please.

4 Likes

This tool looks excellent, and I’m looking forward to incorporating my own buttons into it.

However, the tabs height seem to have grown taller.

Having installed 6000.141f1, the difference can really be felt.

Please strongly consider reverting them to their previous height, as I feel like there is no good reason to waste precious vertical space.

Alternatively, give us an option in editor preferences to reduce the tab heights to a much reduced size, which would be appreciated even if the size is reduced. Some layouts would really favor very small tabs.

Keep up the good work otherwise.

This is a great change for user experience. Thank you for working on this QOL feature. Look forward to testing it out when it releases.

1 Like

Is it IMGUI only or will have ui toolkit support?

You won’t need to know either UI stack to add your own toolbar elements, but to answer your question the backend is written with UI toolkit.

3 Likes

Looks awesome! Is there any ETA or at least update on this topic?
Can we expect this for 6.1?
Thanks :slight_smile:

Unity time is years out of sync at this point with what was needed and when it will be finished

Hi!

I’m the author of Custom Toolbar | com.redwyre.custom-toolbar | Unity Package (UPM) Download | OpenUPM (thanks @Player7), which is a package that lets you add your own toolbar items, so have some thoughts on this topic.

The first is icons. To have more toolbar buttons that make sense Unity will need to invest in some more iconograpy. I know AppUI has some generic icons included, but you’ll need them available when people want to add things, and some Unity specific ones would be good too (eg I added some custom programmer art ones for leak detection setting). Wishful thinking here would be better support for svg allowing a mono vector to be make black for light mode and white for light mode without needing hacks (I think I did manage to fandangle UIElements to work with unity css tinting).

The toolbar editing is excellent, I struggled to do something decent in a window. Is the drag and drop support always there or does the toolbar go into an “edit mode” that adds it?

For creating items, returning a MainToolbarElementInfo seems like a good solution. I implemented most of mine in the attribute which can result in long attributes. However you’ve only show support for a single button, do/will you also support toggle buttons, button groups (eg enum), drop downs, and others (custom elements?)?

For presets, one idea I had was to have both project and user presets, so I could add some items to the toolbar that would be there for everyone on the project in the same place, but then everyone could add their own on top of that. I expect you’ll be focusing on user presets but it would be a neat feature if you could swing it.

I’m really looking forward to this and maybe retiring my package :slight_smile:

2 Likes