FixBlenderImportRotation wiki scipt x mirror issue

Hello, i found this cool editor script to fix blender’s rotation at import. But soon i noticed it is mirroring x axis which is also cause of flipped normals (he is fixing them at line 63).

So i put x*-1 in this line:

 vertices[index] = new Vector3(vertices[index].x *-1, vertices[index].z , vertices[index].y );

And commented out code that is flipping normals.

It works, but i’m not sure if i’m doing it right and i don’t know why is rotation at line 31 needed. Shouldn’t be swapping axis sufficient?

Thanks for your answers

This always worked for me:

http://forum.unity3d.com/threads/blender-unity-rotation-fix.181870/

Remember to apply loc, rot, scale and you could also try the Built-in rotation fix, that was probably derived from Mirgars fix.

Partially figured out, unity front is z+ and blender front is y-, code posted in question rotated front to back.

Solution:

vertices[index] = new Vector3(vertices[index].x , vertices[index].z , -vertices[index].y );

But still i have no idea why rotation is needed.