public byte[] GetChunk(uint id) { IAppDataChunk chunk = anim.GetAppDataChunk(cid._IClass_ID, scid, id); if (chunk == null) { return(null); } return(chunk.Data); }
private static Object GetAppData(IAnimatable anim, UInt32 address) { IAppDataChunk chunk = anim.GetAppDataChunk(ClassID, SuperClassID, address); if (chunk == null) { return(null); } BinaryFormatter binForm = new BinaryFormatter(); using (MemoryStream memStream = new MemoryStream()) { memStream.Write(chunk.Data, 0, chunk.Data.Length); memStream.Seek(0, SeekOrigin.Begin); return(binForm.Deserialize(memStream)); } }