amethyst/evoli

Debug menu

khskarl opened this issue · 4 comments

Currently debugging is really not the smoothest experience, the only way to watch values for variables is by inserting prints everywhere and changing them on-the-fly is an even bumpier road.

I propose using this really cool project: https://github.com/Awpteamoose/amethyst-inspector
image

Seems like a solution to this problem and is simple enough to integrate.

Also, feel free to write on this issue any development frictions that could be improved by better debugging support on the Amethyst side, e.g. more helpful error messages, more debug drawing options besides debug lines.

I assume we’d only use this for local play testing? Making imgui work for WASM deployment is out of scope for some time still, possibly always.

Yes, it's really easy to gate this out when building for wasm.

We can gate out imgui code like this:

#[cfg(not(target_arch = "wasm32"))]
fn inspect(&mut self, entity: Entity, ui: &imgui::Ui<'_>) {
    ...imgui usage...
}

But I'm not sure if that's enough or we need to explicitly state somewhere that amethyst-inspector isn't a dependency when targeting wasm.

Closing the issue as the inspector has been merged in #17 :).

As this was temporarily disabled in #79 pending an update, I’m reopening this as a starter-friendly task.