Problem with character meshes in Unity (exported from blender)
I'm learning from Brackeys and Sebastian's Lague tutorial and got problem with character i made. In unity when i'm making prefab it got empty mesh as you can see 'pants'. In scene view when i'm marking pants it marks it correctly but when i want to move them it doesn't work at all. Hiding pants works fine too.How can i fix that? I don't have that issue with shield and sword. What am I doing wrong? I noticed that my shield and sword got Mesh Filter and Mesh Renderer and other items got Skinned Mesh Renderer and thats probably my problem. How can i export that from blender correctly?
So i was looking for last few hours solution to my problem. I figured out its a problem with exporting blender file to .fbx . When i export only mesh i can see mesh in prefab. If i export mesh + armature it's not working again. Tried various settings and still not working when i export mesh + armature. I checked even Sebastian's Lague original character and it's not working too and thats weird because 1 month ago i was doing same tutorial and it was working. What am i doing wrong ? Or why it's not working this time?
Answer by younger5th · Sep 30, 2020 at 06:02 PM
I've never seen the tutorial so I don't know what your end goal here is, but to help explain what is happening: a skinned mesh is used when an object is assigned/parented to an armature (for deformation), otherwise it just uses a mesh filter and mesh renderer. As long as the mesh is skinned and therefore controlled by the armature, you cannot move it. If you want to quickly fix this, simply duplicate the pants (turn off the original), remove the skinned mesh and add the mesh filter and renderer. Select the pants mesh and drop it into the component filter and assign whatever material(s) you need into the renderer. Now you can freely move it wherever you want.
Assuming you'd want to animate the pants with the armature, I'm not certain why you're trying to move it in the first place. The reason exporting out of blender without the armature worked is because everything was unlinked and assigned a mesh filter and renderer instead of skinned. If you wanted to fix this on the blender side, just select whatever the desired object is, press Alt-P and clear the parent while keeping the transformation. Make sure there are no armature modifiers on it as well (in the modifiers tab).
This might help understand a little more of what the skinned mesh is for https://docs.unity3d.com/Manual/class-SkinnedMeshRenderer.html
Answer by dytrychrafal · Oct 01, 2020 at 02:31 PM
OK i do understand now everything! Thanks for help.