void Awake()
    {
        // WWW Downloader
        sWWWDownloaderImporter = gameObject.AddComponent <WWWDownloaderImporter>();

        // In Animation
        if (bInAnimation)
        {
            // New
            if (listSAnimationClips.Length == 0)
            {
                listSAnimationClips = new SAnimationClips[1];
                listSAnimationClips[0].strFilename = "";
                listSAnimationClips[0].strClipName = "";
            }
        }
    }
    void Awake()
    {
        // WWW Downloader
        sWWWDownloaderImporter = gameObject.AddComponent<WWWDownloaderImporter>();

        // In Animation
        if (bInAnimation)
        {
            // New
            if (listSAnimationClips.Length == 0)
            {
                listSAnimationClips = new SAnimationClips[1];
                listSAnimationClips[0].strFilename = "";
                listSAnimationClips[0].strClipName = "";
            }
        }
    }
    void Start()
    {
        // Init
        if (bDebugLog) Debug.Log("FBXImporterInit()");
        FBXImporterInit();

        // WWW Downloader
        sWWWDownloaderImporter = gameObject.AddComponent<WWWDownloaderImporter>();

        // In Animation
        if (bInAnimation)
        {
            // New
            if (listSAnimationClips.Length == 0)
            {
                listSAnimationClips = new SAnimationClips[1];
                listSAnimationClips[0].strFilename = "";
                listSAnimationClips[0].strClipName = "";
            }
        }

        // Importer Load
        if (bDebugLog) Debug.Log("FBXImporterLoad()");
        IntPtr pFBXSceneInfo = FBXImporterLoad(strFilename);

        // FBX Scene Info
        if (pFBXSceneInfo != IntPtr.Zero)
        {
            FBXSceneInfo sFBXSceneInfo = new FBXSceneInfo();
            IntPtr pFBXImportInfoT = Marshal.AllocHGlobal(Marshal.SizeOf(sFBXSceneInfo));
            try
            {
                sFBXSceneInfo = (FBXSceneInfo)Marshal.PtrToStructure(pFBXSceneInfo, typeof(FBXSceneInfo));
            }
            finally
            {
                Marshal.FreeHGlobal(pFBXImportInfoT);
            }
            strImportApplicationName = Marshal.PtrToStringAnsi(sFBXSceneInfo.strApplicationName).ToString();
        }

        // Imoprt Tool Target (Auto)
        switch (eImportToolTarget)
        {
            case EFBXImportToolTarget.eAuto:
                switch (strImportApplicationName)
                {
                    case "":
                        eImportToolTarget = EFBXImportToolTarget.eCustom;
                        break;
                    case "FBXExporterForUnity":
                        eImportToolTarget = EFBXImportToolTarget.eFBXExporterForUnity;
                        break;
                    case "3ds Max":
                        eImportToolTarget = EFBXImportToolTarget.e3dsMax;
                        break;
                    case "Maya":
                        eImportToolTarget = EFBXImportToolTarget.eMaya;
                        break;
                    case "Softimage":
                        eImportToolTarget = EFBXImportToolTarget.eSoftimage;
                        break;
                    case "MotionBuilder":
                        eImportToolTarget = EFBXImportToolTarget.eMotionBuilder;
                        break;
                }
                break;
        }

        // Imoprt Tool Target
        switch (eImportToolTarget)
        {
            case EFBXImportToolTarget.eCustom:
                break;
            case EFBXImportToolTarget.eFBXExporterForUnity:
                bInDirectControlPointsMode = true;
                break;
            case EFBXImportToolTarget.e3dsMax:
                bInDirectControlPointsMode = false;
                eUpVector = EFBXUpVector.eYAxis;
                eSystemUnit = EFBXSystemUnit.eDefault;
                break;
            case EFBXImportToolTarget.eMaya:
                bInDirectControlPointsMode = false;
                break;
            case EFBXImportToolTarget.eSoftimage:
                bInDirectControlPointsMode = false;
                break;
            case EFBXImportToolTarget.eMotionBuilder:
                bInDirectControlPointsMode = false;
                break;
        }

        // Converter
        FBXImporterGeometryConverter(true);
        FBXImporterAxisSystem((int)eUpVector, (int)eFrontVector, (int)eCoordSystem);
        FBXImporterSystemUnit((int)eSystemUnit);

        // In Shader
        if (bInShader)
        {
            FileInfo fi = new FileInfo(strFilename + ".shader.txt");
            if (fi.Exists)
            {
                sr_shader = fi.OpenText();
                // Dictionary ShaderMaterialBases
                dicShaderMaterialBases.Clear();
                // Shader Count
                string strLine = sr_shader.ReadLine();
                string[] strLines_ShaderCount = strLine.Split(',');
                int iCount = int.Parse(strLines_ShaderCount[1]);
                // ShaderMaterialBases
                SShaderMaterialBase sShaderMaterialBase = new SShaderMaterialBase();
                for (int i = 0; i < iCount; i++)
                {
                    // Model Name
                    string strLine_ModelName = sr_shader.ReadLine();
                    // {
                    strLine = sr_shader.ReadLine();
                    // Material Count
                    strLine = sr_shader.ReadLine();
                    string[] strLines_MaterialCount = strLine.Split(',');
                    int iMaterialCoiunt = int.Parse(strLines_MaterialCount[1]);
                    sShaderMaterialBase.iShaderMaterialCount = iMaterialCoiunt;
                    sShaderMaterialBase.sShaderMaterials = new SShaderMaterial[iMaterialCoiunt];
                    for (int j = 0; j < iMaterialCoiunt; j++)
                    {
                        // Material Name
                        strLine = sr_shader.ReadLine();
                        string[] strLines_MaterialName = strLine.Split(',');
                        sShaderMaterialBase.sShaderMaterials[j].strMaterailName = strLines_MaterialName[1];
                        // Shader Name
                        strLine = sr_shader.ReadLine();
                        string[] strLines_ShaderName = strLine.Split(',');
                        sShaderMaterialBase.sShaderMaterials[j].strShaderName = strLines_ShaderName[1];
                        // {
                        strLine = sr_shader.ReadLine();
                        // Shader Parameters
                        sShaderMaterialBase.sShaderMaterials[j].strShaderParameters = new List<string>();
                        do
                        {
                            strLine = sr_shader.ReadLine();
                            string strShaderParameter = strLine.Replace("\t", "");
                            sShaderMaterialBase.sShaderMaterials[j].strShaderParameters.Add(strShaderParameter);
                        }
                        while (strLine.IndexOf('}') < 0); // }
                    }
                    // }
                    strLine = sr_shader.ReadLine();
                    dicShaderMaterialBases.Add(strLine_ModelName, sShaderMaterialBase);
                }
            }
        }

        // Nodes
        IntPtr pFBXNodes = FBXImporterGetNodes();
        FBXNodeName sFBXNodeName = new FBXNodeName();
        IntPtr pFBXNodeNameT = Marshal.AllocHGlobal(Marshal.SizeOf(sFBXNodeName));
        try {
            sFBXNodeName = (FBXNodeName)Marshal.PtrToStructure(pFBXNodes, typeof(FBXNodeName));
        }
        finally {
            Marshal.FreeHGlobal(pFBXNodeNameT);
        }

        // Node Names
        string[] strParentNodeNames = Marshal.PtrToStringAnsi(sFBXNodeName.strParentNodeNames).ToString().Replace("RootNode", "").Split(',');
        string[] strNodeNames = Marshal.PtrToStringAnsi(sFBXNodeName.strNodeNames).ToString().Split(',');

        goTopAttachNode = goTopAttach;
        if (goTopAttachNode == null)
        {
            goTopAttachNode = gameObject;
        }

        // TopAttachNode Move (Root)
        Vector3 vecTopAttachPos = goTopAttachNode.transform.localPosition;
        Quaternion qTopAttachRot = goTopAttachNode.transform.localRotation;
        Vector3 vecTopAttachScl = goTopAttachNode.transform.localScale;
        goTopAttachNode.transform.localPosition = new Vector3(0.0f, 0.0f, 0.0f);
        goTopAttachNode.transform.localRotation = Quaternion.identity;
        goTopAttachNode.transform.localScale = new Vector3(1.0f, 1.0f, 1.0f);

        for (int i = 0; i < strNodeNames.Length; i++)
        {
            GameObject goNode = null;
            GameObject goParentNode = null;
            if (strNodeNames[i] == "")
            {
                if (bInRootNode)
                {
                    goNode = new GameObject();
                    goNode.name = strInRootNodeName;
                    goNode.transform.parent = goTopAttachNode.transform;
                }
                else
                {
                    goNode = goTopAttachNode;
                }
            }
            if (goNode == null)
            {
                goNode = new GameObject();
                goNode.name = strNodeNames[i];
            }
            if (strParentNodeNames[i] == "")
            {
                if (bInRootNode)
                {
                    goParentNode = goTopAttachNode.transform.FindDeepI(strInRootNodeName).gameObject;
                }
                else
                {
                    goParentNode = goTopAttachNode;
                }
            }
            if (goParentNode == null)
            {
                goParentNode = goTopAttachNode.transform.FindDeepI(strParentNodeNames[i]).gameObject;
            }
            if (goParentNode != null)
            {
                goNode.transform.parent = goParentNode.transform;
            }
            // Import TRS
            ImportTRS(goNode.name, goNode, goTopAttachNode);
        }
        for (int i = 0; i < strNodeNames.Length; i++)
        {
            GameObject goNode;
            if (strNodeNames[i] == "")
            {
                if (bInRootNode)
                {
                    goNode = goTopAttachNode.transform.FindDeepI(strInRootNodeName).gameObject;
                }
                else
                {
                    goNode = goTopAttachNode;
                }
            }
            else
            {
                goNode = goTopAttachNode.transform.FindDeepI(strNodeNames[i]).gameObject;
            }
            // Import Set Mesh
            if (goNode.name == strInRootNodeName)
            {
                /*
                if (eImportToolTarget == EFBXImportToolTarget.e3dsMax)
                {
                    goNode.transform.localRotation = Quaternion.Euler(-90.0f, 0.0f, 0.0f);
                }
                */
            }
            else
            {
                if (bInMesh)
                {
                    ImportSetMesh(goNode.name, goNode, goTopAttachNode, bInDirectControlPointsMode);
                }
            }
        }
        if (bInAnimation)
        {
            // In Animation
            iAnimationClipsCount = 0;
            foreach (SAnimationClips listSAnimationClip in listSAnimationClips)
            {
                // Animataion Load
                if (bDebugLog) Debug.Log("FBXImporterAnimationLoad()");
                if (listSAnimationClip.strFilename == "")
                {
                    listSAnimationClips[iAnimationClipsCount].strFilename = strFilename;
                }
                if (listSAnimationClip.strClipName == "")
                {
                    listSAnimationClips[iAnimationClipsCount].strClipName = listSAnimationClips[iAnimationClipsCount].strFilename;
                }
                IntPtr pFBXImportInfo = FBXImporterAnimationLoad(listSAnimationClips[iAnimationClipsCount].strFilename);
                if (pFBXImportInfo != IntPtr.Zero)
                {
                    // FBX Import Info
                    FBXImportInfo sFBXImportInfo = new FBXImportInfo();
                    IntPtr pFBXImportInfoT = Marshal.AllocHGlobal(Marshal.SizeOf(sFBXImportInfo));
                    try
                    {
                        sFBXImportInfo = (FBXImportInfo)Marshal.PtrToStructure(pFBXImportInfo, typeof(FBXImportInfo));
                    }
                    finally
                    {
                        Marshal.FreeHGlobal(pFBXImportInfoT);
                    }
                    listSAnimationClips[iAnimationClipsCount].sImportInfo.strCreator = Marshal.PtrToStringAnsi(sFBXImportInfo.strCreator).ToString();
                    listSAnimationClips[iAnimationClipsCount].sImportInfo.iVersion = sFBXImportInfo.iVersion;
                    // Converter
                    FBXImporterAxisSystem((int)eUpVector, (int)eFrontVector, (int)eCoordSystem);
                    FBXImporterSystemUnit((int)eSystemUnit);
                    for (int i = 0; i < strNodeNames.Length; i++)
                    {
                        GameObject goNode;
                        if (strNodeNames[i] == "")
                        {
                            if (bInRootNode)
                            {
                                goNode = goTopAttachNode.transform.FindDeepI(strInRootNodeName).gameObject;
                            }
                            else
                            {
                                goNode = goTopAttachNode;
                            }
                        }
                        else
                        {
                            goNode = goTopAttachNode.transform.FindDeepI(strNodeNames[i]).gameObject;
                        }
                        // Import TRS Animation
                        if (goNode.name == strInRootNodeName)
                        {
                            /*
                            if (eImportToolTarget == EFBXImportToolTarget.e3dsMax)
                            {
                                goNode.transform.localRotation = Quaternion.Euler(0.0f, 0.0f, 0.0f);
                            }
                            */
                        }
                        else
                        {
                            ImportTRSAnimation(iAnimationClipsCount, listSAnimationClip.iFrameRate, (int)listSAnimationClip.eTimeMode, listSAnimationClip.eWarapMode, goNode.name, goNode, goTopAttachNode);
                        }
                    }

                    // Add Animation
                    Animation anim = animationAttach;
                    if (anim == null)
                    {
                        anim = goTopAttachNode.GetComponentInParent<Animation>();
                        if (anim == null)
                        {
                            anim = goTopAttachNode.AddComponent<Animation>();
                        }
                    }

                    // Add Animation Clips
                    if (anim != null)
                    {
                        if (listSAnimationClips[iAnimationClipsCount].animationClip != null && listSAnimationClips[iAnimationClipsCount].strClipName != "")
                        {
                            anim.AddClip(listSAnimationClips[iAnimationClipsCount].animationClip, listSAnimationClips[iAnimationClipsCount].strClipName);
                            if (anim.clip == null)
                            {
                                anim.clip = listSAnimationClips[iAnimationClipsCount].animationClip;
                            }
                        }
                    }
                }
                iAnimationClipsCount++;
            }
        }

        // TopAttachNode Move (Retrun)
        goTopAttachNode.transform.localPosition = vecTopAttachPos;
        goTopAttachNode.transform.localRotation = qTopAttachRot;
        goTopAttachNode.transform.localScale = vecTopAttachScl;

        // Renderer Disabled
        Renderer[] rends = goTopAttachNode.GetComponentsInChildren<Renderer>();
        foreach (Renderer rend in rends)
        {
            rend.enabled = false;
        }
        SkinnedMeshRenderer[] skinrends = goTopAttachNode.GetComponentsInChildren<SkinnedMeshRenderer>();
        foreach (Renderer skinrend in skinrends)
        {
            skinrend.enabled = false;
        }

        // Exit
        if (bDebugLog) Debug.Log("FBXImporterExit()");
        FBXImporterExit();

        // Trial
        if (bDebugLog && bTrialMode) Debug.LogWarning("[FBX Importer for Unity] Free Trial version is limited over 90 frames(30fps = 3sec) animations! and Open Commercial WEB Accsess!");
    }