SkinnedMeshBatchRenderer
The SkinnedMeshBatchRenderer component is used to combine the rendering of all meshes controlled by the same skeletal animation component.
Properties | Description |
---|---|
Operation | Any 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. |
Materials | The “master material” used after the merge requires the use of your own customized merge effect. |
LightmapSettings | For baking Lightmap, please refer to Lightmapping for details. |
ShadowCastingMode | Specify whether the current model will cast shadows, you need to Enable Shadow Effect in the scene first。 |
ReceiveShadow | Specify 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. |
SkinningRoot | The root node of the skeletal skin, usually the node where the SkeletalAnimation component is located. |
AtlasSize | The edge length of the final set generated by the combined atlas. |
BatchableTextureNames | The 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. |
Units | The sub-model data before the combined batch, is the main data source. |
Mesh | The model data of current sub-mesh, usually directly from glTF or FBX model file. |
Skeleton | The skeleton data of the current model, usually directly from the glTF or FBX model file. |
Materials | The “sub-materials” used by the current sub-model, which is a non-batching effect, the effect used by different sub-meshes should be consistent. |
Offset | The 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. |
Size | The 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. |
CopyFrom | The 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.