Is there a way to get the Scale Factor in C# scripting?
What exactly are you trying to do? This is import-only setting, you can find these in the model importer.
If you want to customize the asset pipeline, this example is great in my opinion:
https://tech.innogames.com/building-a-custom-asset-pipeline-for-a-unity-project/
I already figured it out, and thanks Lurking-Ninja, that is great info. For anyone else, here is a snippet on how to retrieve it from the meta data.
Note that textwriter is my xml export file. The actual globalScale will be in “replacedString”
const string scaleLabel = "globalScale";
textWriter.WriteStartElement(scaleLabel, "");
string fullMetaPath = fullAssetPath + ".meta";
if (File.Exists(fullMetaPath) == true)
{
string jsonString = File.ReadAllText(fullMetaPath);
string[] splitString = jsonString.Split(new string[] { "\n", "\r\n" }, System.StringSplitOptions.RemoveEmptyEntries);
for (int j = 0; j < splitString.Length; j++)
{
string checkString = splitString[j];
if (checkString.Contains(scaleLabel))
{
string replacedString = checkString.Replace(scaleLabel, "").Replace(":", "").Replace(" ", "");
textWriter.WriteString(ReplaceENumbersWithZero(replacedString));
}
}
}
textWriter.WriteEndElement();