How can I get value of "scale factor" use C#?

How can I get value of "scale factor" (FBXImporter -> Meshes -> Scale Factor, example) use C#?

1 Answer

1

Take a look at this answer: how can I change the scale size of the FBX importer


Edit:

If you want to get the scale size for each resource then you have to identify it by its name or assetPath, maybe something like this (untested):

using UnityEngine;
using UnityEditor;

class MeshPostprocessor : AssetPostprocessor {
  void OnPreprocessModel () {
    if (assetPath.Contains("whateverString")) 
      myscale = (assetImporter as ModelImporter).globalScale;
  }    
}

Edited my answer. Here are the references: http://unity3d.com/support/documentation/ScriptReference/ModelImporter.html and http://unity3d.com/support/documentation/ScriptReference/AssetPostprocessor.OnPreprocessModel.html