Title: Hands-On Rust (Implementing a Game Over Screen)
The text neglects to mention that you have to add #[read_component(Player)]
to the function. This one is kind of strange because the code compiles without error, and runs fine, it’s just that it still crashes (different crash… BTW debugging these things sucks, since my actual code is never in the backtrace).
I finally found it comparing to the downloaded source. Took a while because I was focused on the body of the function and thought I must be getting punchy since it was exactly the same, but didn’t work, while running from the sample code dir worked fine)