Unloading objects that are off of the viewframe

I’ve recently made a system which unloads NPC’s to ReplicatedStorage, locally, once they’re off of the screen. As soon as I started testing the system I noticed that there was no memory drop/increase for the client. Leading on to the question, is there a point of doing so?

So far I’ve been getting mixed answers, some say that ROBLOX already does that by default, implying that making such systems is pointless, others, well, they just say that it helps.

I doubt you’ll get any memory benefits since the objects aren’t actually being destroyed and thus will continue to stay in memory. You should see some render time improvements by removing the NPCs from the workspace though.

1 Like

I think there is no point because ROBLOX has something called “sleeping” parts. Sleeping parts are parts who are not current moving and so their physics don’t need to be calculated.

A scenario where this could be needed is if you have extremely high poly count models just in the distance that really do need to be rendered; could be replaced with a box hull or some equivalent.

So perhaps when you stop viewing a non-moving NPC the NPC was already not doing much to the render cost and so removing it did not dramatically effect the overall time to compute the next frame.

2 Likes