Skip to content

Adding PB Editors available in the GOcontext for the actions overlay#690

Open
lopezt-unity wants to merge 2 commits into
masterfrom
bugfix/action-overlay-adding-pb-editors-to-gocontext
Open

Adding PB Editors available in the GOcontext for the actions overlay#690
lopezt-unity wants to merge 2 commits into
masterfrom
bugfix/action-overlay-adding-pb-editors-to-gocontext

Conversation

@lopezt-unity

Copy link
Copy Markdown
Collaborator

Purpose of this PR

Making editors (Vertex color, UV editor....) available without having to enter the PB context.

Comments to Reviewers

[List known issues, planned work, provide any extra context for your code.]

@u-pr u-pr Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Harness Review

Needs changes

The feature wiring is not consistent yet: the new visibility rule regresses an existing context and only updates one of the overlay render paths.

Reviewed commit 52f8b2b9

🤖 Helpful? 👍/👎


var hidden = action.hidden;
hidden |= (action.group == ToolbarGroup.Object) ? !isGOContext : isGOContext;
hidden |= shouldDisplayAsEditor || (action.group == ToolbarGroup.Object) ? !isGOContext : isGOContext;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1

shouldDisplayAsEditor is true for ToolbarGroup.Tool actions, and because ?: binds after || this line evaluates as (shouldDisplayAsEditor || action.group == ToolbarGroup.Object) ? !isGOContext : isGOContext. With the default Display Editors setting enabled, every editor action now gets hidden |= !isGOContext, so those buttons disappear as soon as the ProBuilder tool context is active. That is a regression from the previous behavior; the change adds GO-context visibility by removing PB-context visibility. Please treat tool-group actions as a separate case so they stay available in both contexts.

🤖 Helpful? 👍/👎


var hidden = action.hidden;
hidden |= (action.group == ToolbarGroup.Object) ? !isGOContext : isGOContext;
hidden |= shouldDisplayAsEditor || (action.group == ToolbarGroup.Object) ? !isGOContext : isGOContext;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1

This only fixes the panel/grid path. When the overlay is used as a horizontal or vertical toolbar, UpdateToolbar() still delegates to ProBuilderActionButton.UpdateContentForToolbar(), and that method keeps the old hidden |= (m_Action.group == ToolbarGroup.Object) ? !isGOContext : isGOContext rule. In those layouts the editor actions are still hidden in GameObjectToolContext, so the feature silently fails for a supported overlay mode. Please share the visibility logic between RefreshAvailableActions() and UpdateContentForToolbar() so both layouts behave the same way.

🤖 Helpful? 👍/👎

@codecov-github-com

codecov-github-com Bot commented Jul 10, 2026

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
Editor/Overlays/ProBuilderActionsOverlay.cs 50.00% 1 Missing ⚠️
@@            Coverage Diff             @@
##           master     #690      +/-   ##
==========================================
+ Coverage   38.43%   38.51%   +0.08%     
==========================================
  Files         279      279              
  Lines       39164    39178      +14     
==========================================
+ Hits        15052    15089      +37     
+ Misses      24112    24089      -23     
Flag Coverage Δ
probuilder_MacOS_6000.0 36.23% <50.00%> (+0.09%) ⬆️
probuilder_MacOS_6000.3 36.23% <50.00%> (+0.09%) ⬆️
probuilder_MacOS_6000.4 36.22% <50.00%> (+0.09%) ⬆️
probuilder_MacOS_6000.5 36.23% <50.00%> (+0.09%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
Editor/Overlays/ProBuilderActionsOverlay.cs 49.21% <50.00%> (+1.52%) ⬆️

... and 5 files with indirect coverage changes

ℹ️ Need help interpreting these results?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant