[BUG] Code is still ran after Destroy Actor

Hello,

I have an object where when I hover the cursor over it, it get’s destroyed via Destroy Actor. However, I have a Print String after it for testing and it still runs it. Im not sure if this is a fun or not, but it’s extremely frusterating

It’s intended behavior, when you call Destroy() it will only mark actor to be destroyed (so called Pending Kill) and then it will be destroyed in next frame. This is for thread safety i assume, so it prevent object to be destroyed when other thread is half way to do something on it, if it would be destroyed other thread would cause a crash.

1 Like

Ohh, I had no idea. Thank you for the knowledge!