I’ve got a static mesh in my map that I want to move, then disappear never to be called again.
Now when I try to remove it after it’s done any movement needed and is itself no longer needed the editor throws up an error after each time the maps played.
I’m using function destroy actor to remove it from the game, this function is triggered after all the movement needed has been completed for the mesh in question, there are no other references to it in the map that I can see, but I still get an error stating object is pending kill??!
Are there casts to your static mesh? you should also run destroy actor in the static mesh blueprint itself not from the level blueprint unless you have a do once, i mean if you’re running it through a tick in the level bp it’ll keep trying to destroy the actor all the time but it’s already destroyed and cannot communicate with it, that’s what makes that error, also if you’re looking at easing load it’s best if you get it sorted out and properly destroyed
I was still getting this error even when I checked IsValid? and cleared associated timers - I used SetLifeSpan with a small value and it solved the problem.