How do you add a mesh component without the large overhead entailed?

J.R. Miller
Wed, 23 Jul 2025 16:44:36 +0000
C++

Apologies if this is a noob question. I am wanting to add lots and lots of meshes to an actor. For reasons that would take too long to explain, I do not want to use instanced static meshes (ISM) or the MASS entity system.

As seen in the screenshot in the right sidebar, a basic mesh component has a massive amount of data associated with it. I might be using a small fraction of that data in my game, and the rest is literally just sitting in RAM doing nothing, wasting space, for absolutely no reason.

EDIT: I’m sure Unreal Engine has some sort of tree shaking algorithm to get rid of some of that excess data. However, when I tested this in a preview build, each newly spawned mesh was still generating way more memory in RAM than what would be expected for a simple mesh/collision.

What’s worse is that each actor likely has some CPU overhead as well. (I’m not an expert – I don’t know what this would be or how severe it is, but it worries me nonetheless.)

How do you add a simple mesh component that does not have any of this overhead? Something that is “naked”, minimal, from the beginning, and has functionality added to it rather than being there by default? Is this possible?

3 posts - 2 participants