Skip to content
Discussion options

You must be logged in to vote

The line at fault is probably

    let settings = q.single();

can panic if you don't have spawned the Camera yet

you can solve it by

  • Making sure that the entity is spawned before anything (I'm not sure if this will solve the problem, as this is a run condition and maybe can happen at some other time?)
  • get_single instead of single ->
   let Ok(settings) = q.get_single() else {
      return false;
   }
   // Your logic here

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@FelipeTJ
Comment options

@hymm
Comment options

hymm Feb 12, 2024
Collaborator

Answer selected by FelipeTJ
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants