jakobhellermann / bevy-inspector-egui

Inspector plugin for the bevy game engine
Apache License 2.0
1.12k stars 166 forks source link

Disable yellow highlighting #110

Closed mwbryant closed 1 year ago

mwbryant commented 1 year ago

How would I disable the yellow highlighting on some components? It appears this is a change detection indicator but it results in a lot of flashing components in my game.

jakobhellermann commented 1 year ago

This is currently not disableable, but I agree that it should be. Would you want to disable this on a fine-grained level, or would it be enough for you to have a default-enabled highlight-changes feature that you would disable?

mwbryant commented 1 year ago

Just a simple feature I can disable globally would solve my problems. It's the 1 frame flashing that happens that is really bothering me. Specifically in my game enemies move on a timer so periodically a lot of components are flashing for a single frame

jakobhellermann commented 1 year ago

I added the feature: https://github.com/jakobhellermann/bevy-inspector-egui/commit/5a445d12244ee6fb4f562fda9e86e26bbd32f398

Does

bevy-inspector-egui = { version = "0.16.2", default-features = false, features = ["bevy_pbr"] }

work?

mwbryant commented 1 year ago

Ah yes that works! Thank you for the fast fix. Configurations like that as a feature flag is an interesting approach I haven't seen much of before.

jakobhellermann commented 1 year ago

Configurations like that as a feature flag is an interesting approach I haven't seen much of before.

To be honest it would probably be a better solution to just pass a boolean or an options struct so that it can be enabled and disabled at runtime, but that would be more effort + API surface so I thought I'd rather have a quick fix and then wait if people actually need that much flexibility.

MatrixDev commented 1 year ago

@jakobhellermann , current "feature" way is not really that friendly :(. it would be much better to have boolean flag in the WorldInspectorPlugin itself even if it is immutable.