Created
August 13, 2014 18:21
-
-
Save musngikd/d83aa4d41cf8532e18d7 to your computer and use it in GitHub Desktop.
Sets FBX Mesh Scale Factors to 1 when imported into Unity
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// BatchRename.cs | |
// Sets FBX Mesh Scale Factors to 1 when imported into Unity | |
// Via Alan Thorn (TW: @thorn_alan) | |
using UnityEngine; | |
using UnityEditor; | |
using System.Collections; | |
/// <summary> | |
/// Sets FBX Mesh Scale Factor to 1 | |
/// </summary> | |
public class FBX_Import : AssetPostprocessor | |
{ | |
public const float importScale = 1.0f; | |
void OnPreprocessModel() | |
{ | |
ModelImporter importer = assetImporter as ModelImporter; | |
importer.globalScale = importScale; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment