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

Add ability to panic to logs example #11171

Merged
merged 1 commit into from
Jan 2, 2024

Conversation

stepancheg
Copy link
Contributor

@stepancheg stepancheg commented Jan 1, 2024

Objective

To debug issues like #11169.

Solution

When P is pressed in logs example, call panic!().

Screenshot 2024-01-02 at 01 10 16

Copy link
Member

@alice-i-cecile alice-i-cecile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be simpler to just generate UI for the text, but I have no objection to using Text2D instead.

@alice-i-cecile alice-i-cecile added C-Examples An addition or correction to our examples C-Testing A change that impacts how we test Bevy or how users test their apps A-Diagnostics Logging, crash handling, error reporting and performance analysis labels Jan 1, 2024
@stepancheg
Copy link
Contributor Author

UI for the text

How to do that, TextBundle?

@alice-i-cecile
Copy link
Member

Yep, TextBundle. You probably don't need to spawn a camera that way.

@stepancheg
Copy link
Contributor Author

Tried using TextBundle, 2D camera is still needed, and text by default gets into the top-left corner instead of center.

So I'm keeping as is for simplicity.

@matiqo15 matiqo15 added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Jan 1, 2024
@mockersf
Copy link
Member

mockersf commented Jan 2, 2024

I would also prefer a TextBundle to keep consistency with other examples. Most examples have their instruction displayed on the top left corner.

@stepancheg
Copy link
Contributor Author

Replaced with TextBundle.

@stepancheg stepancheg force-pushed the logs-panic branch 3 times, most recently from 832da1f to 724fb39 Compare January 2, 2024 01:24
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Jan 2, 2024
Merged via the queue into bevyengine:main with commit d8d8bcf Jan 2, 2024
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Diagnostics Logging, crash handling, error reporting and performance analysis C-Examples An addition or correction to our examples C-Testing A change that impacts how we test Bevy or how users test their apps S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants