Game Development Reference
In-Depth Information
Step 3: FBX Meshes and Scale Factor
Next, it's time to import meshes, which are found in the topic companion files at
AssetsToImport/Meshes
.
Before doing so, however, there's an “issue” to discuss relating to FBX files in general. Specifically, Unity
applies a default mesh
scale factor
of
0.01
to every imported FBX file. To see that, import a single FBX file
and check out the Scale Factor in the Object Inspector, as shown in Figure
2-3
. The result is that every
imported FBX, by default, will appear in your scene 100 times smaller than its original size.
Figure 2-3.
FBX meshes are imported into Unity with a default scale factor of 0.01. This may not be what you want…
The scale factor of 0.01 may, in fact, turn out to be suitable for your imported mesh, depending on
how it was modeled. But if it is, then presumably it's only by accident. Typically, you'll want the scale
factor to be
1.0
and not 0.01. The value 1.0 means the mesh will appear at its original size, unless
it's also being scaled in the scene. In any case, you can easily change the scale factor for a mesh
from the Object Inspector. But typing this in manually can be tedious. Instead, we can code an editor
extension to automate the process, forcing Unity to apply a scale factor of 1.0 to every imported
mesh. Let's create this now, before importing our meshes.