Пример #1
0
        public void Write(AssetWriter writer)
        {
            Heights.Write(writer);
            if (HasAlign(writer.Version))
            {
                writer.AlignStream();
            }
            if (HasShifts(writer.Version))
            {
                Shifts.Write(writer);
                writer.AlignStream();
            }

            PrecomputedError.Write(writer);
            MinMaxPatchHeights.Write(writer);
            if (HasDefaultPhysicMaterial(writer.Version))
            {
                DefaultPhysicMaterial.Write(writer);
            }

            writer.Write(Width);
            writer.Write(Height);
            if (HasThickness(writer.Version))
            {
                writer.Write(Thickness);
            }

            writer.Write(Levels);
            Scale.Write(writer);
        }
        public void Write(AssetWriter writer)
        {
            Heights.Write(writer);
            if (HasHoles(writer.Version))
            {
                writer.Write(Holes);
                writer.Write(HolesLOD);
                writer.Write(EnableHolesTextureCompression);
            }
            if (HasAlign(writer.Version))
            {
                writer.AlignStream();
            }
            if (HasShifts(writer.Version))
            {
                Shifts.Write(writer);
                writer.AlignStream();
            }

            PrecomputedError.Write(writer);
            MinMaxPatchHeights.Write(writer);
            if (HasDefaultPhysicMaterial(writer.Version))
            {
                DefaultPhysicMaterial.Write(writer);
            }

            if (HasWidth(writer.Version))
            {
                writer.Write(Width);
                writer.Write(Height);
            }
            if (HasThickness(writer.Version))
            {
                writer.Write(Thickness);
            }
            if (HasResolution(writer.Version))
            {
                writer.Write(Resolution);
            }

            writer.Write(Levels);
            Scale.Write(writer);
        }