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

Warn when CameraUI is despawned #4861

Closed
wants to merge 1 commit into from
Closed

Warn when CameraUI is despawned #4861

wants to merge 1 commit into from

Conversation

rileysu
Copy link

@rileysu rileysu commented May 28, 2022

Objective

Fixes #4856

Solution

Warn when camera isn't present instead of using .expect()

@DJMcNab
Copy link
Member

DJMcNab commented May 28, 2022

It's not clear to me that we should warn here. The fix used in #4527 follows the example of

match self.query.get_manual(world, view_entity) {
Ok(query) => query,
Err(_) => return Ok(()), // No window
};

We definitely should use an early return instead of a huge match block here, even if we do decide we want to warn here (i.e. use this PR).

@rileysu
Copy link
Author

rileysu commented May 28, 2022

This seems to be handled in #4527

@rileysu rileysu closed this May 28, 2022
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

Successfully merging this pull request may close these issues.

UI crashes if a UI camera is removed
2 participants