Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edit Mode GUI as a ToolbarOverlay #390

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

SixParQuatre
Copy link

The changes makes it that, if the project is using Unity 2021 or newer, the Edit Mode GUI is not rendered and an OverlayTab is shown instead.
Tested in 2020.3, 2021.3 and 2022.3. Though in 2021, the defaultDisplay flag to show the OverlayTab in new Scene editor, doesn't seem to work.

I'd argue this is a good first step to submit vs. waiting for all tool GUI to be ported to the OverlayTab: it makes the first time UX a lot more digestible and remove the conflict of the old UX that was stuck in a corner and was displayed below the Overlay for general manipulation.


Added:

  • EditorModeOverlay: a ToolbarOverlay that offers the same functionality as the Edit Mode GUI found before; plus a button to toggle Realtime CSG On/Off.
  • Icons for each edit mode
    Modified
  • CSGSettings: added a static Action invoked when EnableRealtimeCSG value changes.
  • EditModeManager: Added an Action invoked when the EditMode changes. Added a static property to access it from other classes.
  • EditModeSelection.GUI: surrounded the display of the former Area by #if !UNITY_2021_3_OR_NEWER so it isn't displayed beyond this version
  • CSG_GUIStyleUtility: move the initialization of BrushEditModeContent and brushEditModeTooltips in a separate static function, so they can be called separately and used from EditorModeOverlay.

* EditorModeOverlay: a ToolbarOverlay that offers the same functionality as the Edit Mode GUI found before; plus a button to toggle Realtime CSG On/Off.
* Icons for each edit mode
Modified
* CSGSettings: added a static Action iinvoked when EnableRealtimeCSG value changes.
* EditModeManager: Added an Action invoked when the EditMode changes. Added a static property to access it from other classes.
* EditModeSelection.GUI: surrounded the display of the former Area by #if !UNITY_2021_3_OR_NEWER so it isn't displayed beyond this version
* CSG_GUIStyleUtility: move the initialization of BrushEditModeContent and brushEditModeTooltips in a separate static function, so they can be called separately and used from EditorModeOverlay.
…ue on OverlayTab doesn't seem to have any effect.
@SixParQuatre
Copy link
Author

@nukeandbeans so this is my first time going though a pull request process, is there anything I need to do on my end at this point?

@nukeandbeans
Copy link
Collaborator

Hey! Apologies on taking a bit to get back to you. There isn't much for you to do yet. I need to test and verify it doesn't break things in branches of existing projects, though I'm not completely certain how soon I'll be able to at the moment. Your work so far looks fantastic, though! Thanks for the PR!

@SixParQuatre
Copy link
Author

Hello and happy new year- any update on this ?

@SixParQuatre
Copy link
Author

@nukeandbeans Another ping on this, just in case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update UI to use the modern Overlays API
3 participants