bevy-inspector-egui icon indicating copy to clipboard operation
bevy-inspector-egui copied to clipboard

Inspectable without UI?

Open joshuataylor opened this issue 4 years ago • 1 comments

Hi!

I have the following project structure:

  • shared
  • client
  • server

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?

joshuataylor avatar Sep 01 '21 09:09 joshuataylor

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 avatar Sep 02 '21 09:09 jakobhellermann

I think this is solved with cfg_attr.

jakobhellermann avatar Jan 05 '23 20:01 jakobhellermann