Closed AlfredAn closed 2 months ago
Yes, that's correct, in Flecs Core, OnAdd is triggered before the value is initialized.
It seems like behavior might need to change within Flecs itself to make it safe for the Rust binding. I will update you once this problem is discussed with Sander.
It was overlooked that this is UB in rust
completed, thanks for the issue!
This will panic now.
This prints:
when run three separate times, which suggests that there is UB somewhere.
OnSet
andOnRemove
seem to work fine.