jakobhellermann / bevy-inspector-egui

Inspector plugin for the bevy game engine
Apache License 2.0
1.19k stars 173 forks source link

Controlling InspectorWindows #25

Closed slyedoc closed 3 years ago

slyedoc commented 3 years ago

Is there a way to access InspectorWindows and say control when a window is open, currently forking and making it public, and adding want I need. Am I missing something?

Still new to bevy and egui, and first time using bevy-inspector-egui. Really a pleasure to use though =-)

jakobhellermann commented 3 years ago

I exposed the InspectorWindows now in the main branch, this is how you can control the visibility: https://github.com/jakobhellermann/bevy-inspector-egui/blob/f73bd92968bdaf8fb0b6e017768038730942ba34/examples/hide_window.rs#L23-L24

I'll released this in the new version 0.6.

slyedoc commented 3 years ago

Huge thanks, love your work.

aqilc commented 2 years ago

Sorry, to add to that, is there a way to control WorldInspector windows? I didn't find anything obvious from looking at the API or the source.

Rust-Ninja-Sabi commented 2 years ago

Closing WorldInspector? Any suggestions?

jakobhellermann commented 2 years ago

The world inspector window can only be opened/closed by toggling the enabled field on the WorldInspectorParams resource currently. Any further control like setting the egui window parameter isn't currently possible, but the next version of bevy-inspector-egui for bevy 0.9 will be more flexible, so that you control the window and just embed the world inspector within (discussion about the new version is here https://github.com/jakobhellermann/bevy-inspector-egui/discussions/85)