lxteo / UnitySkinnedMeshCombiner

Combine Unity Mecanim SkinnedMeshRenderers with working bones and blendShapes
36 stars 2 forks source link

Incorrect merging submeshes #2

Open Ossif opened 4 months ago

Ossif commented 4 months ago

Hi there! I appreciate your job here, still some troubles got there though. After CombineMeshes(meshes, SMRobj.GetComponent()), where 'meshes' is list of SkinnedMeshInstance and SMRobj is the object with SkinnedMeshRenderer - my character got all submeshes from 'meshes'. And there is the problem. only FIRST submesh is visible, and, moreover, it doesn't move with bones. Maybe boneWeights initialised wrong idk...

Ossif commented 4 months ago

"And there is the problem. only FIRST submesh is visible" - what i mean is... Let's say, I've got splitted character - splitted head, body, arms, legs. SkinnedMeshInstance [] meshes got all this meshes, skinnedMeshRenderers and etc. correctly and at the same order - [head, body, arms, legs]. So, after CombineMeshes() only head will be visible at editor and at the game. However, I inspected my final SkinnedMeshRenderer properties - and it got all meshes from 'meshes' as submeshes at sharedMesh parameter somehow... Am I missed something? Setting up materials or something like that?.. Im confused. 'll be glad to recieve help.