Search Issue Tracker

By Design

Votes

1

Found in

2020.1.0a6

2020.1.0a11

Issue ID

1196869

Regression

Yes

Multiple colliders and Edit Collider buttons are selected when Edit Collider button is clicked

Physics

-

How to reproduce:
1. Create a new project
2. Add 2 Box Collider Components to the 'Directional Light' GameObject
3. Click any Edit Collider button in the Inspector

Expected result: Only one Edit Collider button and Box Collider is selected
Actual result: Both Edit Collider buttons and Box Colliders are selected

Reproducible with: 2020.1.0a6, 2020.1.0a12
Not reproducible with: 2017.4.34f1, 2018.4.12f1, 2019.2.12f1, 2020.1.0a5
Couldn't test: 2019.3.0b10 Edit Collider button is missing when the second collider is added

Notes:
- Reproducible with 2D physics colliders
- Properties of colliders are not affected (for example, size is changed only for one collider)
- Reproducible only with the same type colliders

  1. Resolution Note (2019.3.X):

    This is the intended behavior currently. Inspector driven EditorTools are expected to only have a single tool instance per-Inspector.

    The issue with allowing duplicate EditorTools within a single Inspector comes down to how handle multiple selections. If tools are expected to support multiple selection, then it doesn't make sense for each Box Collider on a single GameObject to have it's own tool, because the Editor only has a concept of selecting GameObjects and not Components.

    The future for EditorTools is to remove the access point from the Inspector, as they are already available in both the top toolbar and Scene View tools UI, which will remove this visual oddity.

Comments (1)

  1. mhamri

    Jan 10, 2022 15:41

    I +1 this.

    the resolution doesn't make sense. each collider is a different instance and they can have different x, y, z and other attributes. enabling Edit collider on one shouldn't enable the edit mode on another one.

    even if you disable the collider and click on the edit, still it shows the volume-bounding lines for all the colliders which doesn't make sense again.

    the truth is we can have multiple collider on one object and the GUI should respect to that fact. it's quite trouble some when you have a trigger and none trigger collider on one object.

    the non-trigger one should be aligned with the ground so the player doesn't fall into it and the trigger one is hanging somewhere in the air. currently there is no easy way to edit these two without messing with each other. there is no way to lock or hide one of the colliders.

    now with this weird behavior the workflow is to set the x, y, z manually from the properties pane first, and then adjust the none trigger collider which in some cases is quite troublesome

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.