Unity5 File Scale

I am trying to write a script, that corrects the scaling when exporting 3D-Meshes from Blender to Unity via FBX.
This worked fine until now, when with unity5 the file scale option was introduced in the unity importer. The file scale cannot be set, instead it is determined automatically.

And here is the problem:
The file scale for some objects is 0.01 and for others it is 1. After some playing around, I found different file scales for identical copies of the same fbx file!

Does anybody have an idea how to predict the file scale?

This is too late to help, I’m sure, but you might try something like this editor script:

using UnityEditor;
 
public class ImportSettings : AssetPostprocessor
{
    public void OnPreprocessModel()
    {
		ModelImporter modelImporter = (ModelImporter) assetImporter;		
		modelImporter.globalScale = 1f/modelImporter.fileScale; // ensures the scale in the scene is equal to 1
		
    }
}

This editor script was absolutely useless for me it didn’t affect any imported file. Instead follow this link and change each files meta data using Notepad, this trick worked perfectly for me.

If you export from Maya you can fix it using a couple of MEL commands.

These 2 did the trick for me.

FBXExportConvertUnitString m;
FBXExportScaleFactor 100;