How to auto rotate object on FBX import?

I am currently using the ‘AssetPostprocessor’ to change some of the FBX import settings automatically when importing objects. I also want to ‘Auto Rotate’ imported objects on the Y axis by 180 degrees, so that I don’t have to manually do it post-import.

How can I achieve this?
Thanks for your time!

This will do it… HOWEVER this probably isn’t the right way to do it - Please read below.

using UnityEngine;
using UnityEditor;
using System.Collections;

public class FBXPostProcess : AssetPostprocessor
    void OnPostprocessModel (GameObject g)

    void Apply (Transform transform)
        transform.Rotate(new Vector3(0.0f, 180.0f, 0.0f));

Honestly I would suggest creating a script in you’re tool that rotates 180 and bakes the transform before export… like this one for Maya:

$selection = ls("-selection");
setAttr ".rotateY" 180;
makeIdentity -apply true -t 0 -r 1 -s 0 -n 0;
file -force -options "v=0" -typ "FBX export" -pr -es "C:/testModel.fbx";