Destroying actors cause an exception #133
-
Hi :) This project is really great. I especially appreciate explicit mentioning of F# in the docs, this feels very inclusive :) So in my baby steps trying out the engine I thought, what if I delete all actors and noticed that this simple code crashes the engine 😅
Error from Unreal Engine:
I just guess that one should not delete actors within that loop, however it would be good to somehow catch something like that or mention it in the docs here 🙈 Even an answer to this issue might be enough for the next person doing this 😂 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You are trying to destroy all actors in the world every tick when they are no longer valid in consecutive ticks after the initiated destruction which leads to the unhandled exception. On Linux and macOS unhandled exceptions terminate the editor, consider using try/catch blocks. This code is also potentially unsafe because it might destroy hidden actors that are used by the engine itself. |
Beta Was this translation helpful? Give feedback.
You are trying to destroy all actors in the world every tick when they are no longer valid in consecutive ticks after the initiated destruction which leads to the unhandled exception. On Linux and macOS unhandled exceptions terminate the editor, consider using try/catch blocks.
This code is also potentially unsafe because it might destroy hidden actors that are used by the engine itself.