void IResData.Save(ResFileSaver saver)
 {
     saver.WriteSignature(_signature);
     saver.SaveString(Name);
     saver.SaveString(Path);
     saver.Write(Flags, true);
     saver.Write(FrameCount);
     saver.Write((ushort)ShaderParamMatAnims.Count);
     saver.Write((ushort)UserData.Count);
     saver.Write(ShaderParamMatAnims.Sum((x) => x.ParamAnimInfos.Count));
     saver.Write(ShaderParamMatAnims.Sum((x) => x.Curves.Count));
     saver.Write(BakedSize);
     saver.Save(BindModel);
     saver.SaveCustom(BindIndices, () => saver.Write(BindIndices));
     saver.SaveList(ShaderParamMatAnims);
     saver.SaveDict(UserData);
 }
        void IResData.Save(ResFileSaver saver)
        {
            saver.WriteSignature(_signature);
            saver.SaveString(Name);
            saver.SaveString(Path);
            saver.Write(Flags, true);
            if (saver.ResFile.Version >= 0x03040000)
            {
                saver.Write(FrameCount);
                saver.Write((ushort)ShaderParamMatAnims.Count);
                saver.Write((ushort)UserData.Count);

                int curveCount = ShaderParamMatAnims.Sum((x) => x.Curves.Count);
                foreach (var mat in ShaderParamMatAnims)
                {
                    curveCount += mat.ParamAnimInfos.Sum((x) => x.ConstantCount);
                }

                saver.Write(curveCount);
                saver.Write(ShaderParamMatAnims.Sum((x) => x.Curves.Count));
                saver.Write(BakedSize);
            }
            else
            {
                saver.Write((ushort)FrameCount);
                saver.Write((ushort)ShaderParamMatAnims.Count);
                saver.Write(unk);
                saver.Write(ShaderParamMatAnims.Sum((x) => x.Curves.Count));
                saver.Write(BakedSize);
                saver.Write(0);
            }

            PosBindModelOffset           = saver.SaveOffsetPos();
            PosBindIndicesOffset         = saver.SaveOffsetPos();
            PosShaderParamMatAnimsOffset = saver.SaveOffsetPos();
            PosUserDataOffset            = saver.SaveOffsetPos();
        }