Despawn_recursive entity not found error #15382
-
Hi, I have a race condition with despawning causing me some issues. Currently I have a UI for building which has a node bundle that contains buildings under construction (construction node bundle) when it is done I despawn it. I also despawn my UI when the user presses enter. Part of the UI does include that construction node bundle, so if I despawn the entire UI I want to also despawn then construction node bundle. With this in mind if I press enter at the wrong time then I will crash with an entity not found error which is (I believe ) caused by the despawn_recursive calls being used on the same entity. A potential solution I am thinking of is to make an event and an event handler to solve this by checking if it exists then calling despawn_recursive (I don't care if the entity doesn't exist in this case it just means job done). I am not sure if panicking is the intended behaviour as briefly looking at top level code on
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
This might be my answer #5617 (comment) |
Beta Was this translation helpful? Give feedback.
This might be my answer #5617 (comment)