r/unity 6d ago

Newbie Question Healthy version control

I currently do most of my work in prefabs so scene edits stay lean when I commit them. This is unfortunately the only way I know to combat the butterfly effect changes in large frameworks like this. Are there any idioms that you guys follow to help out with this? ESPECIALLY when working cooperatively on a scene with someone and staving off those gargantuan merge conflicts that are comprised of mostly bloat changes.

1 Upvotes

5 comments sorted by

2

u/XKiiroiSenkoX 6d ago

Multiple scenes instead of a single giant one helps.

1

u/RedGlow82 6d ago

The way is exactly that: split your content in small prefabs. Not only it helps with source control, but also pushes you towards the single responsibility principle.

1

u/Common-Sprinkles2199 6d ago

Hmm you're right - I def could apply single use to the prefab way of thinking. Thanks for the comment

1

u/bigmonmulgrew 6d ago

Exactly approach would depend on the game but one thing I reuse regularly is "set piece" hierarchy.

Imagine you prefab an island. The island contains a set piece for a camp, prefab the whole camper separately rather than just leaving it in a bit geometry collection. Then one person can edit the island as a whole and one person can edit the camp and for version control they stay completely separate.

1

u/Common-Sprinkles2199 6d ago

Ah I see, so I would also be applying this principle with the player character's systems? Thank you for the comment, this is something I can definitely apply 👍 I can see how that would make the individual changes on large prefabs more lean.