Accessing .fbx model filescale value in runtime

Hi,

We’re having some model import issues with our Unity 5 code that we didn’t have in Unity 3. When we import .fbx models, some of them will have a filescale value of 0.001 instead of the 0.01 the others have. In Unity 3, this filescale value could be changed, but with Unity 5, it has changed to read only. As I see it, we have 2 options now:

  1. Go through each model in 3DSMax to make sure the scales are set correctly. However, this is not ideal, as it is very time consuming and more models will be added constantly, and not only by us, so it isn’t a lasting solution either.

  2. Reading each model’s filescale value in runtime, and change the scale factor accordingly. However, is it even possible to access this value outside of editor scripts? How would I accomplish this in runtime?

Thanks in advance for any help.

not sure why youd want to change the filescale? i mean that just tells you what the original scale of the file was if you want to change that you have to go into a modeling program and change it. how ever if you want to change the size of the object itself just change the scale factor right above file scale to what ever number youd like , thats all i can say really theres no way around it and it works fine that way if your models are smaller then others some simple math should get them to the right size as the rest of the models so they are to scale.

Here is a funny “its veeeery smalll” for you that might help: Unity 3D / 5 - FBX Model Import File Scale [ FIX / Solution ] - YouTube

Other than that, you can get the variable but only in an editor script:

Thanks for your replies, though I am already aware of what you both wrote.

Yes, we can easily fix each individual model by hand just by changing it’s global scale in Unity, or unit scale in 3DSMax, however: the whole problem with this is the man hours required to fix this, and as mentioned, it won’t give us a lasting solution either.

What we need (if possible) is a way at RUNTIME (not editor scripts either) to make sure each model imported is of the correct unit scale (and if not, change the global scale accordingly).

I don’t think this is possible, though :confused: