/// <summary>
        /// 실제 파일 생성. 중간 생성
        /// </summary>
        /// <param name="ss"></param>
        /// <returns></returns>
        private static bool makeAnmFileMid(String[] ss)
        {
            //読み込み
            //읽기
            for (int f = 0; f < ss.Length - 1; f++)
            {
                // 본 데이터 목록 저장용

                String s  = ss[f];
                String s2 = ss[f + 1];

                // 해더
                byte[] header = new byte[15];

                // 첫번째 포즈
                List <BoneDataA> bda = new List <BoneDataA>();

                using (BinaryReader r = new BinaryReader(File.OpenRead(getPoseDataPath(true) + s)))
                {
                    try
                    {
                        int time = get00000000byInt(s);
                        //最初以外はヘッダー部分を読み飛ばす
                        //첫 이외는 헤더 부분을 건너
                        for (int i = 0; i < 15; i++)
                        {
                            header[i] = r.ReadByte();
                        }
                        byte t = r.ReadByte();
                        while (true)
                        {
                            if (t == 1)
                            {
                                //A先頭部分
                                //A 선두 부분
                                t = r.ReadByte();
                                byte   c = 0;
                                String name;
                                bool   isB = false;
                                c = r.ReadByte();
                                if (c == 1)
                                {
                                    isB  = true;
                                    name = "";
                                }
                                else
                                {
                                    isB  = false;
                                    name = "" + (char)c;
                                    t--;
                                }
                                for (int i = 0; i < t; i++)
                                {
                                    c     = r.ReadByte();
                                    name += (char)c;
                                }
                                BoneDataA a = null;
                                foreach (BoneDataA tmp in bda)
                                {
                                    if (tmp.name.Equals(name))
                                    {
                                        a = tmp;
                                        break;
                                    }
                                }
                                if (a == null)
                                {
                                    a      = new BoneDataA();
                                    a.name = name;
                                    a.isB  = isB;
                                    a.b    = new List <BoneDataB>();
                                    //B部分
                                    //파트 B
                                    while (true)
                                    {
                                        t = r.ReadByte();
                                        if (t >= 64)
                                        {
                                            BoneDataB b = new BoneDataB();
                                            b.index = t;
                                            int tmpf = r.ReadByte();
                                            r.ReadByte();
                                            r.ReadByte();
                                            r.ReadByte();
                                            //C部分
                                            bool firstFrame = true;
                                            for (int i = 0; i < tmpf; i++)
                                            {
                                                if (firstFrame)
                                                {
                                                    firstFrame = false;
                                                    b.c        = new List <BoneDataC>();
                                                    BoneDataC bc = new BoneDataC();
                                                    bc.time = 0;
                                                    //time
                                                    r.ReadBytes(4);
                                                    //raw
                                                    bc.raw = r.ReadBytes(12);
                                                    b.c.Add(bc);
                                                }
                                                else
                                                {
                                                    BoneDataC bc = new BoneDataC();
                                                    bc.time = time;
                                                    //time
                                                    r.ReadBytes(4);
                                                    //raw
                                                    bc.raw = r.ReadBytes(12);
                                                    b.c.Add(bc);
                                                }
                                            }
                                            a.b.Add(b);
                                        }
                                        else
                                        {
                                            break;
                                        }
                                    }
                                    bda.Add(a);
                                }
                                else
                                {
                                    //B部分
                                    while (true)
                                    {
                                        t = r.ReadByte();
                                        if (t >= 64)
                                        {
                                            BoneDataB b = null;
                                            foreach (BoneDataB tmpb in a.b)
                                            {
                                                if (t == tmpb.index)
                                                {
                                                    b = tmpb;
                                                    break;
                                                }
                                            }
                                            if (b == null)
                                            {
                                                b       = new BoneDataB();
                                                b.index = t;
                                                int tmpf = r.ReadByte();
                                                r.ReadByte();
                                                r.ReadByte();
                                                r.ReadByte();
                                                //C部分
                                                bool firstFrame = true;
                                                for (int i = 0; i < tmpf; i++)
                                                {
                                                    if (firstFrame)
                                                    {
                                                        firstFrame = false;
                                                        b.c        = new List <BoneDataC>();
                                                        BoneDataC bc = new BoneDataC();
                                                        bc.time = 0;
                                                        //time
                                                        r.ReadBytes(4);
                                                        //raw
                                                        bc.raw = r.ReadBytes(12);
                                                        b.c.Add(bc);
                                                    }
                                                    else
                                                    {
                                                        BoneDataC bc = new BoneDataC();
                                                        bc.time = time;
                                                        //time
                                                        r.ReadBytes(4);
                                                        //raw
                                                        bc.raw = r.ReadBytes(12);
                                                        b.c.Add(bc);
                                                    }
                                                }
                                                a.b.Add(b);
                                            }
                                            else
                                            {
                                                int tmpf = r.ReadByte();
                                                r.ReadByte();
                                                r.ReadByte();
                                                r.ReadByte();
                                                //C部分
                                                bool firstFrame = true;
                                                for (int i = 0; i < tmpf; i++)
                                                {
                                                    if (firstFrame)
                                                    {
                                                        firstFrame = false;
                                                        BoneDataC bc = new BoneDataC();
                                                        bc.time = time;
                                                        //time
                                                        r.ReadBytes(4);
                                                        //raw
                                                        bc.raw = r.ReadBytes(12);
                                                        b.c.Add(bc);
                                                    }
                                                    else
                                                    {
                                                        r.ReadBytes(16);
                                                    }
                                                }
                                            }
                                        }
                                        else
                                        {
                                            break;
                                        }
                                    }
                                }
                            }
                            else
                            {
                                break;
                            }
                        }
                    }
                    catch (Exception)
                    {
                        errorFile = "ポーズ「" + s + "」로드하는 동안 오류가 발생했습니다";
                        return(false);
                    }
                }

                using (BinaryReader r = new BinaryReader(File.OpenRead(getPoseDataPath(true) + s2)))
                {
                    try
                    {
                        int time = get00000000byInt(s);
                        //最初以外はヘッダー部分を読み飛ばす
                        //첫 이외는 헤더 부분을 건너
                        for (int i = 0; i < 15; i++)
                        {
                            header[i] = r.ReadByte();
                        }
                        byte t = r.ReadByte();
                        while (true)
                        {
                            if (t == 1)
                            {
                                //A先頭部分
                                //A 선두 부분
                                t = r.ReadByte();
                                byte   c = 0;
                                String name;
                                bool   isB = false;
                                c = r.ReadByte();
                                if (c == 1)
                                {
                                    isB  = true;
                                    name = "";
                                }
                                else
                                {
                                    isB  = false;
                                    name = "" + (char)c;
                                    t--;
                                }
                                for (int i = 0; i < t; i++)
                                {
                                    c     = r.ReadByte();
                                    name += (char)c;
                                }
                                BoneDataA a = null;
                                foreach (BoneDataA tmp in bda)
                                {
                                    if (tmp.name.Equals(name))
                                    {
                                        a = tmp;
                                        break;
                                    }
                                }
                                if (a == null)
                                {
                                    a      = new BoneDataA();
                                    a.name = name;
                                    a.isB  = isB;
                                    a.b    = new List <BoneDataB>();
                                    //B部分
                                    //파트 B
                                    while (true)
                                    {
                                        t = r.ReadByte();
                                        if (t >= 64)
                                        {
                                            BoneDataB b = new BoneDataB();
                                            b.index = t;
                                            int tmpf = r.ReadByte();
                                            r.ReadByte();
                                            r.ReadByte();
                                            r.ReadByte();
                                            //C部分
                                            bool firstFrame = true;
                                            for (int i = 0; i < tmpf; i++)
                                            {
                                                if (firstFrame)
                                                {
                                                    firstFrame = false;
                                                    b.c        = new List <BoneDataC>();
                                                    BoneDataC bc = new BoneDataC();
                                                    bc.time = 0;
                                                    //time
                                                    r.ReadBytes(4);
                                                    //raw
                                                    bc.raw = r.ReadBytes(12);
                                                    b.c.Add(bc);
                                                }
                                                else
                                                {
                                                    BoneDataC bc = new BoneDataC();
                                                    bc.time = time;
                                                    //time
                                                    r.ReadBytes(4);
                                                    //raw
                                                    bc.raw = r.ReadBytes(12);
                                                    b.c.Add(bc);
                                                }
                                            }
                                            a.b.Add(b);
                                        }
                                        else
                                        {
                                            break;
                                        }
                                    }
                                    bda.Add(a);
                                }
                                else
                                {
                                    //B部分
                                    while (true)
                                    {
                                        t = r.ReadByte();
                                        if (t >= 64)
                                        {
                                            BoneDataB b = null;
                                            foreach (BoneDataB tmpb in a.b)
                                            {
                                                if (t == tmpb.index)
                                                {
                                                    b = tmpb;
                                                    break;
                                                }
                                            }
                                            if (b == null)
                                            {
                                                b       = new BoneDataB();
                                                b.index = t;
                                                int tmpf = r.ReadByte();
                                                r.ReadByte();
                                                r.ReadByte();
                                                r.ReadByte();
                                                //C部分
                                                bool firstFrame = true;
                                                for (int i = 0; i < tmpf; i++)
                                                {
                                                    if (firstFrame)
                                                    {
                                                        firstFrame = false;
                                                        b.c        = new List <BoneDataC>();
                                                        BoneDataC bc = new BoneDataC();
                                                        bc.time = 0;
                                                        //time
                                                        r.ReadBytes(4);
                                                        //raw
                                                        bc.raw = r.ReadBytes(12);
                                                        b.c.Add(bc);
                                                    }
                                                    else
                                                    {
                                                        BoneDataC bc = new BoneDataC();
                                                        bc.time = time;
                                                        //time
                                                        r.ReadBytes(4);
                                                        //raw
                                                        bc.raw = r.ReadBytes(12);
                                                        b.c.Add(bc);
                                                    }
                                                }
                                                a.b.Add(b);
                                            }
                                            else
                                            {
                                                int tmpf = r.ReadByte();
                                                r.ReadByte();
                                                r.ReadByte();
                                                r.ReadByte();
                                                //C部分
                                                for (int i = 0; i < tmpf; i++)
                                                //for (int i = 0; i < 2; i++)
                                                {
                                                    //if (firstFrame)
                                                    //{
                                                    //    firstFrame = false;
                                                    //BoneDataC bc = new BoneDataC();
                                                    r.ReadBytes(4);
                                                    byte[]    raw = r.ReadBytes(12);
                                                    BoneDataC bc  = b.c[i];
                                                    bc.time = i;
                                                    //time

                                                    //raw
                                                    bc.raw2 = raw;
                                                    bc.rawMid();
                                                    //b.c.Add(bc);

                                                    //}
                                                    //else
                                                    //{
                                                    //    r.ReadBytes(16);
                                                    //}
                                                }
                                            }
                                        }
                                        else
                                        {
                                            break;
                                        }
                                    }
                                }
                            }
                            else
                            {
                                break;
                            }
                        }
                    }
                    catch (Exception)
                    {
                        errorFile = "ポーズ「" + s + "」로드하는 동안 오류가 발생했습니다";
                        return(false);
                    }
                }


                // 파일로 출력
                int si = get00000000byIntMid(s, s2);
                Debug.Log("String si " + si);
                using (BinaryWriter w = new BinaryWriter(File.Create(getPoseDataPath(true) + anmName + "_" + si.ToString("D8") + ".anm")))
                {
                    try
                    {
                        w.Write(header);
                        foreach (BoneDataA a in bda)
                        {
                            w.Write(a.outputABinary());
                        }
                        w.Write((byte)0);
                        w.Write((byte)0);
                        w.Write((byte)0);
                    }
                    catch (Exception)
                    {
                        errorFile = "モーション「" + anmName + ".anm」내보내기 중에 오류가 발생했습니다";
                        return(false);
                    }
                }
            }

            return(true);
        }
        private static bool makeAnmFile(String[] ss)
        {
            List <BoneDataA> bda = new List <BoneDataA>();

            byte[] header  = new byte[15];
            bool   isFirst = true;

            //読み込み
            //읽기
            foreach (String s in ss)
            {
                using (BinaryReader r = new BinaryReader(File.OpenRead(getPoseDataPath(true) + s)))
                {
                    try
                    {
                        if (isFirst)
                        {
                            isFirst = false;
                            //最初のファイルでヘッダー部分を決定
                            //첫 번째 파일 헤더 부분을 결정
                            //14바이트
                            for (int i = 0; i < 15; i++)
                            {
                                header[i] = r.ReadByte();
                            }
                            byte t = r.ReadByte();
                            while (true)
                            {
                                if (t == 1)
                                {
                                    BoneDataA a = new BoneDataA();
                                    //A先頭部分
                                    //A 선두 부분
                                    t = r.ReadByte();
                                    byte c = 0;
                                    c = r.ReadByte();
                                    if (c == 1)
                                    {
                                        a.isB  = true;
                                        a.name = "";
                                    }
                                    else
                                    {
                                        a.isB  = false;
                                        a.name = "" + (char)c;
                                        t--;
                                    }
                                    for (int i = 0; i < t; i++)
                                    {
                                        c       = r.ReadByte();
                                        a.name += (char)c;
                                    }
                                    a.b = new List <BoneDataB>();
                                    //B部分
                                    while (true)
                                    {
                                        t = r.ReadByte();
                                        if (t >= 64)
                                        {
                                            BoneDataB b = new BoneDataB();
                                            b.index = t;
                                            int tmpf = r.ReadByte();
                                            r.ReadByte();
                                            r.ReadByte();
                                            r.ReadByte();
                                            //C部分
                                            bool firstFrame = true;
                                            for (int i = 0; i < tmpf; i++)
                                            {
                                                if (firstFrame)
                                                {
                                                    firstFrame = false;
                                                    b.c        = new List <BoneDataC>();
                                                    BoneDataC bc = new BoneDataC();
                                                    bc.time = 0;
                                                    //time
                                                    r.ReadBytes(4);
                                                    //raw
                                                    bc.raw = r.ReadBytes(12);
                                                    b.c.Add(bc);
                                                }
                                                else
                                                {
                                                    r.ReadBytes(16);
                                                }
                                            }
                                            a.b.Add(b);
                                        }
                                        else
                                        {
                                            break;
                                        }
                                    }

                                    bda.Add(a);
                                }
                                else
                                {
                                    break;
                                }
                            }
                        }
                        else
                        {
                            int time = get00000000byInt(s);
                            //最初以外はヘッダー部分を読み飛ばす
                            //첫 이외는 헤더 부분을 건너
                            r.ReadBytes(15);
                            byte t = r.ReadByte();
                            while (true)
                            {
                                if (t == 1)
                                {
                                    //A先頭部分
                                    //A 선두 부분
                                    t = r.ReadByte();
                                    byte   c = 0;
                                    String name;
                                    bool   isB = false;
                                    c = r.ReadByte();
                                    if (c == 1)
                                    {
                                        isB  = true;
                                        name = "";
                                    }
                                    else
                                    {
                                        isB  = false;
                                        name = "" + (char)c;
                                        t--;
                                    }
                                    for (int i = 0; i < t; i++)
                                    {
                                        c     = r.ReadByte();
                                        name += (char)c;
                                    }
                                    BoneDataA a = null;
                                    foreach (BoneDataA tmp in bda)
                                    {
                                        if (tmp.name.Equals(name))
                                        {
                                            a = tmp;
                                            break;
                                        }
                                    }
                                    if (a == null)
                                    {
                                        a      = new BoneDataA();
                                        a.name = name;
                                        a.isB  = isB;
                                        a.b    = new List <BoneDataB>();
                                        //B部分
                                        //파트 B
                                        while (true)
                                        {
                                            t = r.ReadByte();
                                            if (t >= 64)
                                            {
                                                BoneDataB b = new BoneDataB();
                                                b.index = t;
                                                int tmpf = r.ReadByte();
                                                r.ReadByte();
                                                r.ReadByte();
                                                r.ReadByte();
                                                //C部分
                                                bool firstFrame = true;
                                                for (int i = 0; i < tmpf; i++)
                                                {
                                                    if (firstFrame)
                                                    {
                                                        firstFrame = false;
                                                        b.c        = new List <BoneDataC>();
                                                        BoneDataC bc = new BoneDataC();
                                                        bc.time = 0;
                                                        //time
                                                        r.ReadBytes(4);
                                                        //raw
                                                        bc.raw = r.ReadBytes(12);
                                                        b.c.Add(bc);
                                                    }
                                                    else
                                                    {
                                                        BoneDataC bc = new BoneDataC();
                                                        bc.time = time;
                                                        //time
                                                        r.ReadBytes(4);
                                                        //raw
                                                        bc.raw = r.ReadBytes(12);
                                                        b.c.Add(bc);
                                                    }
                                                }
                                                a.b.Add(b);
                                            }
                                            else
                                            {
                                                break;
                                            }
                                        }
                                        bda.Add(a);
                                    }
                                    else
                                    {
                                        //B部分
                                        while (true)
                                        {
                                            t = r.ReadByte();
                                            if (t >= 64)
                                            {
                                                BoneDataB b = null;
                                                foreach (BoneDataB tmpb in a.b)
                                                {
                                                    if (t == tmpb.index)
                                                    {
                                                        b = tmpb;
                                                        break;
                                                    }
                                                }
                                                if (b == null)
                                                {
                                                    b       = new BoneDataB();
                                                    b.index = t;
                                                    int tmpf = r.ReadByte();
                                                    r.ReadByte();
                                                    r.ReadByte();
                                                    r.ReadByte();
                                                    //C部分
                                                    bool firstFrame = true;
                                                    for (int i = 0; i < tmpf; i++)
                                                    {
                                                        if (firstFrame)
                                                        {
                                                            firstFrame = false;
                                                            b.c        = new List <BoneDataC>();
                                                            BoneDataC bc = new BoneDataC();
                                                            bc.time = 0;
                                                            //time
                                                            r.ReadBytes(4);
                                                            //raw
                                                            bc.raw = r.ReadBytes(12);
                                                            b.c.Add(bc);
                                                        }
                                                        else
                                                        {
                                                            BoneDataC bc = new BoneDataC();
                                                            bc.time = time;
                                                            //time
                                                            r.ReadBytes(4);
                                                            //raw
                                                            bc.raw = r.ReadBytes(12);
                                                            b.c.Add(bc);
                                                        }
                                                    }
                                                    a.b.Add(b);
                                                }
                                                else
                                                {
                                                    int tmpf = r.ReadByte();
                                                    r.ReadByte();
                                                    r.ReadByte();
                                                    r.ReadByte();
                                                    //C部分
                                                    bool firstFrame = true;
                                                    for (int i = 0; i < tmpf; i++)
                                                    {
                                                        if (firstFrame)
                                                        {
                                                            firstFrame = false;
                                                            BoneDataC bc = new BoneDataC();
                                                            bc.time = time;
                                                            //time
                                                            r.ReadBytes(4);
                                                            //raw
                                                            bc.raw = r.ReadBytes(12);
                                                            b.c.Add(bc);
                                                        }
                                                        else
                                                        {
                                                            r.ReadBytes(16);
                                                        }
                                                    }
                                                }
                                            }
                                            else
                                            {
                                                break;
                                            }
                                        }
                                    }
                                }
                                else
                                {
                                    break;
                                }
                            }
                        }
                    }
                    catch (Exception)
                    {
                        errorFile = "ポーズ「" + s + "」\n로드하는 동안 오류가 발생했습니다";
                        return(false);
                    }
                }
            }

            //結合
            //결합
            bool isExist = File.Exists(getPoseDataPath(true) + anmName + ".anm");

            using (BinaryWriter w = new BinaryWriter(File.Create(getPoseDataPath(true) + anmName + ".anm")))
            {
                try
                {
                    w.Write(header);
                    foreach (BoneDataA a in bda)
                    {
                        w.Write(a.outputABinary());
                    }
                    w.Write((byte)0);
                    w.Write((byte)0);
                    w.Write((byte)0);
                }
                catch (Exception)
                {
                    errorFile = "モーション「" + anmName + ".anm」\n내보내기 중에 오류가 발생했습니다";
                    return(false);
                }
            }

            // 게임 모션 목록에 추가
            if (!isExist)
            {
                MotionWindow mw = GameObject.FindObjectOfType <MotionWindow>();
                if (mw != null)
                {
                    PopupAndTabList patl = mw.PopupAndTabList;
                    try
                    {
                        mw.AddMyPose(getPoseDataPath(true) + anmName + @".anm");
                    }
                    catch (Exception e)
                    {
                        Debug.LogError(e.ToString());
                    }
                }
            }

            return(true);
        }