First, set up your model and export it as an FBX file.
Next, import the model into Unity. You may notice that the vertex and normals are flipped.
Then, add this C# script to your project and run it only once:
public class MeshInverter : MonoBehaviour {
// Use this for initialization
void Start () {
Mesh mesh = GetComponent<SkinnedMeshRenderer>().sharedMesh;
mesh.triangles = mesh.triangles.Reverse().ToArray();
}
// Update is called once per frame
void Update () {
}
}
After running the first script, remove it and replace it with this JS script. Run this script only once:
#pragma strict
import System.Linq;
function Start () {
var mesh = (transform.GetComponent("SkinnedMeshRenderer") as SkinnedMeshRenderer).sharedMesh;
var normals : Vector3[] = mesh.normals;
for (var i=0;i<normals.Length;i++){
normals[i] = -normals[i];
}
mesh.normals = normals;
}
function Update () {
}
Once the second script has been executed, remove it as well. Your model should now be fixed.
Edit
Also, ensure that your bones or mesh do not have any negative scales, as this can cause issues and could lead to problems when exporting as .fbx files.