Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bevy Inspector egui support? #1

Open
andrewexton373 opened this issue Sep 23, 2022 · 5 comments
Open

Bevy Inspector egui support? #1

andrewexton373 opened this issue Sep 23, 2022 · 5 comments

Comments

@andrewexton373
Copy link

Hello, I've been giving this plugin a go in a project of mine and was wondering if you plan on supporting the bevy-inspector-egui plugin at some point, or know of a way to get it working with your plugin? I'd like to be able to use it to debug issues and change StatBar variables at runtime. Any help would be appreciated.

@ickshonpe
Copy link
Owner

I haven't been using bevy inspector egui with any of my own projects, so I'm not that familiar with it.

I had a try just now at adding support, and it doesn't quite work. There are some grid errors and it doesn't seem to like the StatBarBorder and BarColor types. I added an example, "inspector.rs" to the project that shows the problems.

It might be this is just something inherently wrong with the design of the crate as having all the data contained within a single fat StatBar component isn't very ECSish.

@ickshonpe
Copy link
Owner

ickshonpe commented Sep 24, 2022

Had an idea for a better design while playing around with this that would be more bevy-inspector-egui friendly as a side effect. I'll try implementing it tomorrow morning.

@ickshonpe
Copy link
Owner

It works
stat_bar_inspected

@andrewexton373
Copy link
Author

That’s awesome! I appreciate the work you’ve done on this plugin. Kudos!

@ickshonpe
Copy link
Owner

Thanks for the nice words, I should have a new release out today.

Been playing around a lot with different ideas and I think the API I have is okay now. The internals are a little bit more complicated now as all the types have generic parameters and phantomdata, but hopefully not too much of that leaks out. I mainly just want this crate to be easy to use.

I've temporarily removed the rotation stuff and just have horizontal/vertical/reversible bars. Arbitrarily orientated statbars looked cool on the project front page but I've never actually seen a game with a diagonal hitpoints meter etc, and though I got the math to work it seemed really expensive. My next goal is to replace the sprite-based rendering with some shaders I've written, then rotations should be trivial and you can have nice effects like a gradient on the bar and rounded borders etc and circular pie-meters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants