I created a class ACTOR from C++, which contains a static mesh component. Then I couldn’t destroy it. So I made a test with a blueprint. spawn this ACTOR, and then it couldn’t be destroyed as well.As you see:
Then I did another test. I didn’t use C++ to create a blueprint of ACTOR, and added the same static Mesh to it, then spawn it and then destroyed it. This time it was successfully destroyed.
And after waiting for a long time, the engine crashed (maybe an hour or two). If this ACTOR had not been destroyed, this situation would not have happened (it has not crashed after waiting for 4 hours). This crash has happened many times.
Ok not sure whats going on, but, you are creating an actor and in the same breath destroying it. Is it possible that the actor does not get fully instantiated and cannot be destroyed correctly. Maybe add a delay of a second or 2 before you destroy it and see if that is the issue. If not then report back
Sorry,I spent a week reading this post before, But I don’t’ t know why I didn’t’ t receive your message. I didn’t’ t see your reply the next day until I logged in today.
But the good news is that I have solved this problem. For some reason, there is something wrong with this C++ class, and I can work normally after deleting and rebuilding it.
Thank you for your help.