Skinned Mesh Rendere is invisible in build
Fedi15 opened this issue · 1 comments
Fedi15 commented
void AttachToMesh(SkinnedMeshRenderer mesh, int slotIndex) {
if(!IsServer) return;
if (currentMeshes [slotIndex] != null) {
currentMeshes [slotIndex].gameObject.GetComponent<NetworkObject>().Despawn();
}
SkinnedMeshRenderer newMesh = Instantiate(mesh.equipment3D) as SkinnedMeshRenderer;
newMesh.bones = targetMesh.bones;
newMesh.rootBone = targetMesh.rootBone;
currentMeshes [slotIndex] = newMesh;
newMesh.gameObject.GetComponent<NetworkObject>().Spawn();
}
when i spawn mesk.equipment3D it's not visible on game build but when i change instead of spawn mesk.equipment3D i make copy of player skinned mesh renderer and then i change it's property like shared mesh and shared material to the one mesk.equipment3D it work and visible in editor and build
mootaz23 commented
I have the same problem please help !