SkinnedMeshBatchRenderer

The SkinnedMeshBatchRenderer component is used to combine the rendering of all meshes controlled by the same skeletal animation component.

mesh batch

PropertiesDescription
OperationAny changes to the property will not take effect immediately and will need to be recalculated by tapping the Cook button before they can be applied.
MaterialsThe “master material” used after the merge requires the use of your own customized merge effect.
LightmapSettingsFor baking Lightmap, please refer to Lightmapping for details.
ShadowCastingModeSpecify whether the current model will cast shadows, you need to Enable Shadow Effect in the scene first。
ReceiveShadowSpecify whether the current model will receive and display shadow effects generated by other objects, you need to Enable Shadow Effect in the scene first. This property only takes effect when the shadow type is ShadowMap.
SkinningRootThe root node of the skeletal skin, usually the node where the SkeletalAnimation component is located.
AtlasSizeThe edge length of the final set generated by the combined atlas.
BatchableTextureNamesThe texture properties of the material that are actually involved in the merge, and the properties that are not involved in the merge, use the first unit’s texture uniformly.
UnitsThe sub-model data before the combined batch, is the main data source.
MeshThe model data of current sub-mesh, usually directly from glTF or FBX model file.
SkeletonThe skeleton data of the current model, usually directly from the glTF or FBX model file.
MaterialsThe “sub-materials” used by the current sub-model, which is a non-batching effect, the effect used by different sub-meshes should be consistent.
OffsetThe offset of the current sub-model when it is merged, with the top-left corner of the atlas as the origin, in the range [0, 1]. For example, the data in the figure represents that the sub-map is overlapped with the top-left corner of the atlas.
SizeThe size of the current sub-model, in the range [0, 1]. For example, the data in the figure represents 1/2 of the entire set.
CopyFromThe target properties (except offset and size) can be copied automatically by dragging in SkinningModelComponent for easy operation.

Please refer to BatchedSkinnedMeshRenderer for more details.

For API reference, please refer to SkinnedMeshBatchRenderer API.