jakobhellermann / bevy-inspector-egui

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

Inspectable without UI? #32

Closed joshuataylor closed 1 year ago

joshuataylor commented 3 years ago

Hi!

I have the following project structure:

With server, I call in structs from shared, which I want to be inspectable from the client. But to do this I need to include bevy-inspector-egui in shared, which then means the server has to pull in GUI assets.

Is it possible to just include the inspectable part in shared and use bevy-inspector-gui in the client app but not the server app?

jakobhellermann commented 3 years ago

You could try having a inspectable feature in shared and enable that feature in client but not server.

A conditional derive I believe looks like #[cfg_attr(feature = "inspectable", derive(Inspectable)].

jakobhellermann commented 1 year ago

I think this is solved with cfg_attr.