Announcement

Collapse
No announcement yet.

Spawning actors question

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Spawning actors question

    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?

    #2
    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.
    Last edited by ImmutableLambda; 05-27-2016, 09:18 PM.
    They broke the signatures so I removed mine thinking it'd be awhile. The signatures work again, but I haven't redone my signature yet.

    Comment


      #3
      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.

      Comment

      Working...
      X