How to use lifetime in event? #5211
Replies: 2 comments
-
Events must be |
Beta Was this translation helpful? Give feedback.
-
You can't pass a reference to a component through an event. This is because the lifetime of This needs a different solution. How does your |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I'm a beginner in Rust and Bevy. I can basically understand the concept of 'lifetime' but still can't actually use it in practice.
Here is my situation, I have defined a struct that has a property referencing to another struct.
I want to use it in a system but don't know how to specify those lifetimes.
Any guidance is very appreciated. Thank you.
Beta Was this translation helpful? Give feedback.
All reactions