- Home /
Question by
Stwr · Apr 06, 2011 at 03:16 PM ·
scalefbxmodelimporter
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#?
Comment
Answer by efge · Apr 06, 2011 at 04:43 PM
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; }
}
I want to get the scale factor for each resource, rather than global.