Dynamic Mesh Combined allows you to easily combine meshes that adds to the scene dynamically. The main idea of plugin is simple have parent object with MC Mesh Combiner Component and then you can add meshes with MC Combinable as child objects. All those objects will be automatically combined into single mesh.
The current implementation has dependencies on the following packages:
com.unity.shadergraph
: This package is required for rendering baked materials and is an essential part of the Universal Render Pipeline (URP) integration. Can be skiped if you don't want to bake materials, or use current implementation. See Bake Materials
Additionally, Unity will prompt you to install the following dependencies automatically when you import the package:
com.unity.memoryprofiler
: This package is used for memory profiling purposes. It provides tools and functionality to analyze and optimize memory usage within the application.
com.unity.profiling.core
: This package is used for performance profiling and analysis. It offers features to measure and improve the performance of your application.
Please ensure that you allow Unity to install these dependencies when prompted during the package import process.
Basic setup looks like that:
Where container should have component MC Mesh Combiner
Each mesh should contain MC Combinablecomponent:
That simple setup will bake all 3 meshes into single one and render it on the scene. You can add or remove any amount of meshes in runtime and they will be automatically baked.