Download

When should I be destroying my actors?

Hello, I just started developing my first game on UE4 and I’m a little confused about how to handle destroying my actors. Should I be destroying every actor as soon as they are no longer needed? Or is destroying an actor only recommended in certain situations, such as for dynamically spawned actors? For example, my game has several rooms on one level. Once you access the next room the previous room is no longer accessible by the player. Should I be destroying the previous room at this point? Would that help performance in the later areas? I apologize if this is a basic question, but I hear a lot of talk about destroying actors and couldn’t seem to find a specific rule for when it should be done.

It’s all about the RAM memory, and the ticking so think it yourself : P, You destroy them no more ticking and no more memory ( I think i may be wrong). Performance it’s an important. try out UDK
My self I don’t really care so much about destroying actors unless it’s a multiplayer game.

Are you saying that only ticking actors affect memory when destroyed? if I destroy a static actor that doesn’t tick, will it have no effect on performance? What about lights? Are they different than mesh actors? Should they be destroyed whenever possible? Sorry for so many questions, I just want to try and clarify so that I’m not working off of false assumptions.

all actors in a level (static mesh/light/blueprints/ect) remain in ram until told other wise. if you are never returning to that part of the level, kill the actors:)

Sounds good, thank you!