public static FrameGroup Serialize(ThingCategory category, ref Net.InputMessage binaryReader)
        {
            FrameGroup frameGroup = new FrameGroup();

            frameGroup.Width  = binaryReader.GetU8();
            frameGroup.Height = binaryReader.GetU8();
            if (frameGroup.Width > 1 || frameGroup.Height > 1)
            {
                frameGroup.ExactSize = binaryReader.GetU8();
            }
            else
            {
                frameGroup.ExactSize = 32;
            }

            frameGroup.Layers        = binaryReader.GetU8();
            frameGroup.PatternWidth  = binaryReader.GetU8();
            frameGroup.PatternHeight = binaryReader.GetU8();
            frameGroup.PatternDepth  = binaryReader.GetU8();
            frameGroup.Phases        = binaryReader.GetU8();

            if (frameGroup.Phases > 1)
            {
                frameGroup.Animator = FrameGroupAnimator.Serialize(frameGroup.Phases, ref binaryReader);
            }

            int totalSprites = frameGroup.Width * frameGroup.Height * frameGroup.Layers * frameGroup.PatternWidth * frameGroup.PatternHeight * frameGroup.PatternDepth * frameGroup.Phases;

            for (int j = 0; j < totalSprites; j++)
            {
                frameGroup.Sprites.Add(binaryReader.GetU32());
            }

            return(frameGroup);
        }