https://github.com/stefaaan06/unity-mesh-combiner
Unity Mesh Merger tool that allows merging at editor time and when building.
https://github.com/stefaaan06/unity-mesh-combiner
mesh mesh-combiner mesh-merging optimization unity unity-mesh-combine unity-mesh-merge unity-optimization unity-package unity3d unity3d-plugin
Last synced: 10 months ago
JSON representation
Unity Mesh Merger tool that allows merging at editor time and when building.
- Host: GitHub
- URL: https://github.com/stefaaan06/unity-mesh-combiner
- Owner: Stefaaan06
- License: mit
- Created: 2025-06-28T14:31:29.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-06-28T16:35:15.000Z (10 months ago)
- Last Synced: 2025-06-28T17:29:46.311Z (10 months ago)
- Topics: mesh, mesh-combiner, mesh-merging, optimization, unity, unity-mesh-combine, unity-mesh-merge, unity-optimization, unity-package, unity3d, unity3d-plugin
- Language: C#
- Homepage: https://stefaaan06.com/
- Size: 37.1 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Mesh Combiner Tool is a Unity Editor extension that lets you merge meshes (and their children) into a single optimized mesh at editor time.
It is useful for reducing draw calls and improving performance.
## Features
* **Combine Multiple Meshes**
Merge selected GameObjects (including all children) into one mesh with a single MeshFilter & MeshRenderer.
* **Back-Face Stripping**
Optionally remove inward-facing triangles to cut away hidden geometry.
* **Mutual-Face Culling**
Cull pairs of nearly opposite faces within a configurable distance threshold to eliminate internal geometry overlaps.
* **Hierarchy Preservation & Restoration**
Captures each object’s parent, sibling index, and local transform so you can “Uncombine” and restore your exact original hierarchy, transforms, and activation states.
* **Collider Copying**
Retains colliders on the combined mesh by duplicating the original GameObjects colliders.
* **Tag & Layer Unification**
If all sources share the same tag or layer, the combined mesh inherits it automatically.
* **Undo Support**
Full integration with Unity’s Undo system for all operations.

## Installation
1. **Via Git URL (Package Manager)**
* Open Unity’s **Window → Package Manager**
* Click the **+** button → **Add package from git URL…**
* Enter:
```
https://github.com/Stefaaan06/Unity-Mesh-Combiner.git
```
2. You can now open the tool window under **tools** -> **Mesh Combiner**.
## Usage
1. In the Unity Editor, select one or more GameObjects (any of them may have children with MeshFilters).
2. Go to **Tools → Mesh Combiner** to open the combiner window.
3. Toggle options as desired:
4.
* **Strip inward-facing triangles**
* **Cull mutually facing triangles** (and adjust the **Pair distance threshold**)
5. Click **Combine Selected**
6.
* Selected meshes are hidden under an `_oldMesh` group
* A new `_combined` GameObject is created, with combined geometry, materials, tags, layers, and colliders
7. To revert, select the combined GameObject in the Hierarchy and click **Uncombine**
* Restores original meshes, hierarchy, transforms, and deletes the combined object
## Contribution & Known Issues
Any contribution is welcome as there is still a lot to improve and add:
- Better readme with more images or gifs
- Better workflow for editing merged meshes. Right now you have to Uncombine -> edit the objects -> Combine again
- More and better optimisation methods
- The duplicated colliders dont mirror tags and layers so they have to be set manually
- Merged Objects have all the Materials of the old Meshes, even if they are duplicate. This leads to performance and lighting issues