- Home /
Unity unit scale compared to Maya
Hey, I'm really struggling to understand what causes this issue and how to prevent it, or at least to understand Unity units properly if I'm just not understanding how they work.
I've read that although Unity doesn't have explicit unit sizes, most people interpret 1 unit = 1 metre. In Maya the default is 1 unit = 1cm.
However everything that I import from maya is 10x the size it should be. The only solution I've found is to change the import scale from 1 to 0.1 on EVERYTHING that I import or to scale everything in unity much larger than is wanted, so a 1metre cube would be scaled 10x10x10. I'd much rather import exactly what was created, at the size intended, however I don't want to start creating models in Maya at ridiculously scaled down sizes just so they import correctly into Unity.
This is what I'm getting in Unity. The cube on the left is 1 Maya centimetre, and the cube on the right is 1 Unity unit.
Every post I see online about this just says 'leave everything as the default, they work as they should', but this is obviously wrong compared to what everyone else is getting, everyone else seems to get two cubes that are the same size.
I've checked and double checked that the maya units are set to centimetres.
Thanks!
As far as I know the default import settings is 0.1 for models, at least for me. I don't use maya, but maybe you can change the unit size as long as you are exporting for Unity? (I my self like it to be 1)
Thanks gajdot, having the import settings default to 0.1 would make life a lot easier, so I wouldn't have to remember to change it every time. No idea if there is a way to change the default though.
Answer by gajdot · Nov 15, 2013 at 03:25 PM
You can use an editor script to change the import scale. You can find a solution in this question: http://answers.unity3d.com/questions/12187/import-settings.html
Just change it to be like this:
using UnityEditor;
public class FBXScaleFix : AssetPostprocessor
{
public void OnPreprocessModel()
{
ModelImporter modelImporter = (ModelImporter) assetImporter;
modelImporter.globalScale = 0.1;
}
}
Just don't forget to place your script in Assets/Editor folder inside your project folder.