Exemple #1
0
        public override void ParseObject(AssetsReader reader)
        {
            int startPosition = reader.Position;

            Name = reader.ReadString();
            //int readLen = ObjectInfo.DataSize - (reader.Position - startPosition);
            //MeshData = reader.ReadBytes(readLen);
            SubMeshes        = reader.ReadArrayOf(r => new Submesh(r));
            BlendShapeData   = new BlendShapeData(reader);
            BindPose         = reader.ReadArrayOf(r => reader.ReadSingle());
            BoneNameHashes   = reader.ReadArrayOf(r => r.ReadUInt32());
            RootBoneNameHash = reader.ReadUInt32();
            MeshCompression  = reader.ReadByte();
            IsReadable       = reader.ReadBoolean();
            KeepVerticies    = reader.ReadBoolean();
            KeepIndicies     = reader.ReadBoolean();
            reader.AlignTo(4);
            IndexFormat = reader.ReadInt32();
            IndexBuffer = reader.ReadArray();
            reader.AlignTo(4);
            VertexData               = new VertexData(reader);
            CompressedMesh           = new CompressedMesh(reader);
            LocalAABB                = new AABB(reader);
            MeshUsageFlags           = reader.ReadInt32();
            BakedConvexCollisionMesh = reader.ReadArray();
            reader.AlignTo(4);
            BakedTriangleCollisionMesh = reader.ReadArray();
            reader.AlignTo(4);
            MeshMetrics1 = reader.ReadSingle();
            MeshMetrics2 = reader.ReadSingle();
            StreamData   = new StreamingInfo(reader);
        }
Exemple #2
0
        public override void ParseObject(AssetsReader reader)
        {
            Name = reader.ReadString();
            ForcedFallbackFormat = reader.ReadInt32();
            DownscaleFallback    = reader.ReadBoolean();
            reader.AlignTo(4);
            Width             = reader.ReadInt32();
            Height            = reader.ReadInt32();
            CompleteImageSize = reader.ReadInt32();
            TextureFormat     = (TextureFormatType)reader.ReadInt32();
            MipCount          = reader.ReadInt32();
            IsReadable        = reader.ReadBoolean();
            StreamingMipmaps  = reader.ReadBoolean();
            reader.AlignTo(4);
            StreamingMipmapsPriority = reader.ReadInt32();
            ImageCount       = reader.ReadInt32();
            TextureDimension = reader.ReadInt32();
            TextureSettings  = new GLTextureSettings(reader);
            LightmapFormat   = reader.ReadInt32();
            ColorSpace       = reader.ReadInt32();
            int imageDataSize = reader.ReadInt32();

            ImageData = reader.ReadBytes(imageDataSize);
            reader.AlignTo(4);
            StreamData = new StreamingInfo(reader);
        }