I have made an actor blueprint script that generates random paintings that populate my museum scene using various randomly selected masks, colors, and transformations. So far the results are really cool and I’ll share screenshots when I can, but I’m out of town for a few days. Anyway, in order to spawn new random designs every runtime since there’s an element of procedural level design, I have a different actor that spawns the painting actor. My question is should I remove these actors from memory after they spawn the painting actor?
After they spawn your paintings, call ‘Destroy Actor’ and pass in the actor you want cleared from memory.
If you do this inside the spawner managing actor, pass in ‘self’ (or it’s autofilled).
Edit: Just realized you wanted to know if you should. There’s certainly no harm in doing so. Hard to say if you need to though. Unless the spawning logic is complicated with lots of variables, you could leave them be.
You could, it’s probably decent practice if the spawner is no-longer needed, but it’s impact on performance will likely be almost non-existent.