jakobhellermann / bevy-inspector-egui

Inspector plugin for the bevy game engine
Apache License 2.0
1.1k stars 164 forks source link

fix change detection in hierarchy ui #183

Closed aarthificial closed 4 months ago

aarthificial commented 4 months ago

Fixes a bug where hierarchy_ui doesn't return true when the selection is modified by clicking on a nested entity. This problem can be reproduced by running the egui_dock exmaple:

cargo run --example egui_dock
  1. Expand the Pbr Mesh (6v0) entity on the left
  2. Select any resource in Resources
  3. Click on the nested PointLight (7v0) on the left

Doing so should update the inspector to display information about the point light but it doesn't because hierarchy_ui doesn't return true in this case: https://github.com/jakobhellermann/bevy-inspector-egui/blob/1b916a05df5c04f342de53880130dcfcc345db24/crates/bevy-inspector-egui/examples/integrations/egui_dock.rs#L213-L216

jakobhellermann commented 4 months ago

Thanks!