Does creating unions slow down your game?

The reason I am asking is because I have multiple parts with the same code in them, and if I union them I can just use one script. I just don’t know if this will slow down my game.

6 Likes

Yes, they do. @iGottic go crazy bro.

4 Likes

Honestly odds are you’ll never need to use UnionOperations. I’ve never needed them nor have I ever met someone who genuinely needed to use UnionOperations. (besides for CSG editing, but that’s not what you’re using them for)

When creating a UnionOperation, or a Union, Roblox will generate its triangles/topology so you will be able to visualize what the object looks like. However, Roblox isn’t perfect and it ends up creating unnecessary triangles, causing them to be rendered, and overtime these can cause performance lag.

Not only that but I’ve just recently learned that they take up slighty more memory than MeshParts/Parts as Roblox has to remember what parts make up a UnionOperation. (So when you un-union something, it’ll be reverted)

Also because of the bad triangle generation which I mentioned before, it’ll create bad collision calculations as well, especially if your UnionOperation has a lot of triangles/has CollisionFidelity set to Default or PreciseConvexDecomposition.

Don’t use UnionOperations.

4 Likes

As a matter of fact, they do slow down your game performance.

from what i’ve heard i do think they slow down your game but is still controversial if they do or not but i think its better to be safe and don’t use them

1 Like

I’ve been summoned here.

Unions are by all means, really bad.

20 Likes

Yes, I heard that unions can slow down your game.

If you want multiple parts to be in the same script, use the mesh or use GetChildren/GetDescendants. Unions are prefer for negative parts, but don’t use it too much or it can slow your game performance.

I don’t think you will notice. The ‘do not use unions’ thing is over-hyped. You’re talking about making one union? Or 10,000, or what? I think the scale matters most.

2 Likes

But it can be noticed on mobile devices. By not caring about this, you are sacrificing performance.

Somehow I knew you’d be here.

To prevent this from being spam, anyone else reading this, it’s just better to learn blender and model something amazing in 5 minutes with less lag, rather than build the same thing in roblox and take 5 hours, have it lag your game, or possibly corrupt on you. (Corrupted unions is what finally pushed me to move to blender. That stuff annoyed the hell out of me.) Plus, blender has far more features like custom texturing. Blender also has much more applications in the wider development world.

In the scripting side of things, I’m not too educated, but other people have said to just use parts, so do what they say.

2 Likes

Are you telling me, that if I make 2 or 3 parts into one union, on a baseplate, with nothing else on it, mobile will lag?

If that’s what you’re saying, have my doubts.

1 Like

No, I’m saying that mobile will be less performant.

I see what you’re saying, from a large-ish scale workflow perspective that makes sense. But I think the scale of what he is trying to do is relevant. If this is a one-off thing or a few unions total, I think your benefit would be small and time cost in learning blender would be significant. (but useful in the big picture)

2 Likes

Perhaps, but with a few unions in question, the performance reduction may not be measurable or significant.

The OP was asking if unions have a performance impact, not if it’s noticeable in small quantities.

1 Like

Well, if its not significant or hardly measurable then I wouldn’t say it will ‘slow down your game’

It makes a difference if your building something like this:
image
or something like this:
image

So I suspect the answer to OP’s question is, ‘it depends’

2 Likes

Here is my answer to this. Union or Model, Which one is the best - #3 by RichardPRoosevelt
Unions create un-needed poly for no reason.

1 Like

I’m not trying to say unions are better or in any way comparable to a blender creation, but …
in your 2nd video, your ‘comparable’ 600 face blender spheres look more like stop signs so you’d probably have more faces if you made them more smooth like the union that you imported. I’m sure it would still be lower but you need more than 600 it seems. And what the union did to the ‘box’, yeah, what is that? :slight_smile:

I think this is a good post with more details on the pro’s and cons to using unions and/or meshes:

What’s your use case?

Are you making something like, for example, multiple objects floating up and down all in sync?

In this case, you should group the multiple objects, set a primary part, and apply a script to the model to control the primary part of the model, which will move the whole model with it as long as it is anchored.

That’s the right way to do it and you should do it like that for ease of modifying/moving these objects in the future

You shouldn’t union them for this use case, but even if you do, there won’t be a measurable performance loss.

that’s it.


As for what other people here have said, unions aren’t bad and anyone who believes unions shouldn’t be used is flat out wrong.

Unions allow developers to easily and quickly create intricate models that would otherwise be either impossible or would take a long time to make.

For example;
Say we want some intention on a spaceship for a turret to be in, or a handle for a desk drawer or something similar, with unions it would be done somewhat like this
https://gyazo.com/6a93403886a543e0d1fd9e7e199f7508

How exactly should this be made in blender by hand without using the boolean modifier?

Unions have a use, are useful, and are often used in production games because they are simpler and easier to use when you understand them and use them correctly.

Incorrect use of unions is what creates a performance decrease in games.

You shouldn’t make a map entirely out of unions. A lot of beginner builders tend to see their maps have some lag, and they decide to union all the parts they can together to reduce lag. This, of course, is not a correct use case.

Instead of telling new developers to never use unions (like what @iGottic has done with his videos), and countless others telling people to stop using unions, maybe try to educate them on how to correctly use unions.

I’ve seen some people give actually good advice on the use of unions, like only using unions on high part count models which will be repeatedly used on a map, like lamp posts, trash cans, stuff like that. This can really help new developers that don’t know how exactly unions work and decide to never use them because of bad advice.

@iGottic second video compares two different meshes entierly?
His recreation of the object consists of 8 spheres of 6 rings and 10(?) segments and a cube and he compares that to a unioned object of 8 roblox spheres made of 12 rings and 24 segments and a cube.

Either this is pure ignorance, done intentionally to make the gap between face counts as high as possible, or was an actual mistake, and if so, I hope this is addressed.

Better use of a video like this would be to inform people that simple models shouldn’t be unioned, unions should be used for models with a lot of parts, cylinders, or spheres that you will use repeatedly across the map. Right now this video only shows the byproduct of incorrect use of unions

In conclusion, Use meshes when possible, but don’t be afraid to use unions. Be smart when using unions, use them only when actually necessary. You’ll find they play almost as important of a role as meshes do.

6 Likes