Only draw enabled shapes not based on if selected within the Editor. #18423
+1
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This pull request modifies how shapes are displayed in the viewport. As shown below, the 'Visible' property determines whether the shape remains visible in the editor viewport at all times. Currently it also seem to depend if the entity where this component resides is selected or not. Meaning even if I do set the 'Visible' property to false (not show) the shape will be shown when the entity with the component is selected.
Deselecting the entity will then hide it, if 'Visible' property is disabled.
I do however expect the shape not being drawn no matter the entity is selected or not, if this property is set to false.
So I like to propose to change this behavior to honor the setting 'Visible', as the tooltip of this property says:
'Always display this shape in the editor viewport.'
How was this PR tested?
Used only a Box Shape to render in the level. Set the property 'Visible' to false (un-checked).