Custom tool development in 2023 - thoughts on the contextual system?

Hey all! Unofficial feedback thread here. We’ve been working away on the contextual tooling system, and finally have a good demo of full integration, via the (public) “pb/select-modes” experimental branch of ProBuilder.

In the video (or try yourself!), you can see in action:

  • Creation tools in the main toolbar

  • Tool “variants” fly-out

  • Tool Contexts, with “sub” contexts

  • Component Tools, Tool Settings, etc

  • Contextual right-click menu for actions

  • Actions with options and preview/cancel

  • General overlay controls

Video: “How to Make Better Unity Tools” -

We’d love to know what you think of this, especially if you’d like to go as far as trying out the API yourselves. The “big idea” here is that all toolsets (internal or asset store, etc) can skip most the boilerplate stuff and (more importantly) immediately feel like native, integrated Unity tools. Also, to avoid conflicts, bugs, etc of course (via a shared platform that is built to handle all these toolsets).

Links:
ProBuilder branch: https://github.com/Unity-Technologies/com.unity.probuilder/tree/pb6/select-modes
Unity Alpha: (download via hub)

Thanks for your early thoughts and feedback!

14 Likes

This overlay system is really great!
I can’t wait for when it will be used consistently within the editor, but while you work on this I really think you should make a video on the official youtube channel explaining how it works from the user’s perspective and showcasing what it’s capable of.
It’s new so not everyone knows about it and it’s the type of things that should be learned by every new users.

1 Like

Hey, thanks Paul! I’ll see if I can get that done for sure!

1 Like

Good work!

I like to see the divider lines in the contextual menu to be less strong I think 50 percent alpha would do it.
Also would like control over the font size in the contextual menu’s
And if the corner radius could be adjusted when on mac then all is great

I want them to look as native as possible to the OS

1 Like

+1 for this on Windows…

Would usually prefer native looks over custom styles. Because very often custom UI feels more sluggish, missing UX features or wasting space.. Native UI have already things ready to use and builtin (like common keyboard shortcuts) And its just easier to learn and use if its familiar to rest of your system.. unlike Blender or Godot for example.

9472792--1331476--upload_2023-11-15_13-54-45.png

1 Like

Thanks for the feedback! That contextual menu itself though, is another team/project/thing. I think there is a thread for it already?

I’d like to focus on the tooling workflows here, thanks!

1 Like

Sure thing, can you ping the other team to make an official thread for those? as far as I know there is not one ( not counting the one I made )

The overlay menu’s in the scene view have rounded corners I like that, but the others don’t, Would love to see them unified to look like scene view ones.

Would be nice to have an option in sceneview overlays to set the color of the overlays to dark gray instead of black.

Sceneview overlays are doing a good job overall!

1 Like

Nice work

the YouTube sound was a bit low.

i like to ask in future can you talk more about how vertex normals and vertex tangents work.
i would be nice to visualize the Normals and Tangents and also have options for custom smoothing angles. :wink:

also, i think it would be great if you can talk more about the model formats and exporting the final result back to fbx baking the final Normals and tangents into data

2 Likes

9:25 yeah I hope that is live in the future… the more Unity can have Maya’s modelling toolkit workflow with things the better.

I think it looks good and is about time, the sooner it’s available to other versions the better. I can’t move past 2022 LTS until 2023TLS/6 is out.

On the subject of menu’s though, can we also get proper detachable menu’s & submenu’s …again like Maya which was ahead of the curve by 20years in some ways, I find myself constantly having to goto the same menu’s when working in a certain ‘context’ and it makes no damn sense this can’t be improved if you just continue on replacing menu’s with built in context ones, so I can make a menu floatable where ever I want for quick easy access.

I don’t really care about native menu’s looks at this point, Apple/MS/Linux all fail and have made theming there respective OS’s a giant overcomplicated mess, the sooner Unity just replace the whole menu stuff with there own implementation to fit theme the better imo, also take a look at UE menu’s, seems like they didn’t care about native menu looks… be different if native wasn’t rubbish but it kinda is.

1 Like

Does this allow us to create a generic right-click menu that’s available for everything? Ie. is there a way to make a non-contextual right click menu?

2 Likes

Wow, this context menu stuff is very exciting. It seems like it will shift how tools are designed in unity from its foundation, which is quite cool. The design of tools and contexts give me heavy blender vibes, so I’ll be right at home.

Great stuff!

1 Like

Everything you showed in the video makes sense to me. I was missing a code example/snippet how to add menu items to the contextual system menu though. Perhaps you could post it in this forum thread?

4 Likes

Hey all! Sorry, posted this then jumped off to vacation and forgot to check back, oops! Useful replies incoming ASAP, thanks for the feedback!

2 Likes

Hey David! Hmm we do have a panel for viewing normals and tangents, it’s “Tools > ProBuilder > Smoothing” - does that work for you?

For exporting, best way is to add the “FBX Exporter” package, easy peasy! :slight_smile:

Hooray! Hmm, for code, Karl would know best. I’ll let him know :slight_smile:

Yup! That would actually just be a standard Overlay, with a shortcut to pop it open, at your mouse position. So, that’s even better - could be a list, or icons, or images, or data … anything you want!

@Peter77 The documentation for EditorAction has an example: Unity - Scripting API: EditorAction

1 Like