Ejemplo n.º 1
0
 public void Parse(AssetsReader reader)
 {
     Verticies   = reader.ReadArrayOf((r) => new BlendShapeVertex(r));
     Shapes      = reader.ReadArrayOf((r) => new BlendShape(r));
     Channels    = reader.ReadArrayOf((r) => new BlendShapeChannel(r));
     FullWeights = reader.ReadArrayOf((r) => r.ReadSingle());
 }
Ejemplo n.º 2
0
        public override void Parse(AssetsReader reader)
        {
            base.ParseBase(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);
        }
Ejemplo n.º 3
0
 protected override void Parse(AssetsReader reader)
 {
     base.Parse(reader);
     Name                       = reader.ReadString();
     PreloadTable               = reader.ReadArrayOf <ISmartPtr <AssetsObject> >(x => SmartPtr <AssetsObject> .Read(ObjectInfo.ParentFile, this, x));
     Container                  = reader.ReadArrayOf(x => new Map(ObjectInfo.ParentFile, this, x));
     MainAsset                  = new AssetInfo(ObjectInfo.ParentFile, this, reader);
     RuntimeCompatibility       = reader.ReadUInt32();
     AssetBundleName            = reader.ReadString();
     Dependencies               = reader.ReadArrayOf <ISmartPtr <AssetsObject> >(x => SmartPtr <AssetsObject> .Read(ObjectInfo.ParentFile, this, x));
     IsStreamedSceneAssetBundle = reader.ReadBoolean();
     reader.AlignTo(4);
     ExplicitDataLayout = reader.ReadInt32();
     PathFlags          = reader.ReadInt32();
     SceneHashes        = reader.ReadArrayOf(x => new Map(ObjectInfo.ParentFile, this, x));
 }
Ejemplo n.º 4
0
 public void Parse(AssetsReader reader)
 {
     VertexCount = reader.ReadUInt32();
     Channels    = reader.ReadArrayOf(r => new Channel(r));
     Data        = reader.ReadArray();
     reader.AlignTo(4);
 }
Ejemplo n.º 5
0
        public override void Parse(AssetsReader reader)
        {
            base.ParseBase(reader);
            Name   = reader.ReadString();
            Shader = SmartPtr <AssetsObject> .Read(this.ObjectInfo.ParentFile, this, reader);

            ShaderKeywords           = reader.ReadString();
            LightmapFlags            = reader.ReadUInt32();
            EnableInstancingVariants = reader.ReadBoolean();
            DoubleSidedGI            = reader.ReadBoolean();
            reader.AlignTo(4);
            CustomRenderQueue    = reader.ReadInt32();
            StringTagMap         = reader.ReadArrayOf(r => new Map <string, string>(reader.ReadString(), reader.ReadString()));
            DisabledShaderPasses = reader.ReadArrayOf(r => r.ReadString());
            SavedProperties      = new PropertySheet(this.ObjectInfo.ParentFile, this, reader);
        }
Ejemplo n.º 6
0
        public override void Parse(AssetsReader reader)
        {
            base.ParseBase(reader);
            IsEnabled            = reader.ReadBoolean();
            CastShadows          = reader.ReadByte();
            ReceiveShadows       = reader.ReadByte();
            DynamicOcclude       = reader.ReadByte();
            MotionVectors        = reader.ReadByte();
            LightProbeUsage      = reader.ReadByte();
            ReflectionProbeUsage = reader.ReadByte();
            reader.AlignTo(4);
            RenderingLayerMask = reader.ReadUInt32();
            if (ObjectInfo.ParentFile.Metadata.VersionGte("2018.3"))
            {
                RendererPriority = reader.ReadInt32();
            }
            LightmapIndex               = reader.ReadUInt16();
            LightmapIndexDynamic        = reader.ReadUInt16();
            LightmapTilingOffset        = new Vector4F(reader);
            LightmapTilingOffsetDynamic = new Vector4F(reader);
            Materials       = reader.ReadArrayOf(r => (ISmartPtr <MaterialObject>)SmartPtr <MaterialObject> .Read(ObjectInfo.ParentFile, this, r));
            StaticBatchInfo = new StaticBatchInfo(reader);
            StaticBatchRoot = SmartPtr <Transform> .Read(ObjectInfo.ParentFile, this, reader);

            ProbeAnchor = SmartPtr <Transform> .Read(ObjectInfo.ParentFile, this, reader);

            LightProbeVolumeOverride = SmartPtr <GameObject> .Read(ObjectInfo.ParentFile, this, reader);

            SortingLayerID          = reader.ReadInt32();
            SortingLayer            = reader.ReadInt16();
            SortingOrder            = reader.ReadInt16();
            AdditionalVertexStreams = SmartPtr <MeshObject> .Read(ObjectInfo.ParentFile, this, reader);
        }
Ejemplo n.º 7
0
 protected override void Parse(AssetsReader reader)
 {
     base.Parse(reader);
     LocalRotation = new QuaternionF(reader);
     LocalPosition = new Vector3F(reader);
     LocalScale    = new Vector3F(reader);
     Children      = reader.ReadArrayOf(x => (ISmartPtr <Transform>)SmartPtr <Transform> .Read(ObjectInfo.ParentFile, this, reader));
     Father        = SmartPtr <AssetsObject> .Read(ObjectInfo.ParentFile, this, reader);
 }
Ejemplo n.º 8
0
            public void Parse(AssetsFile assetsFile, AssetsObject owner, AssetsReader reader)
            {
                Texture = SmartPtr <Texture2DObject> .Read(assetsFile, owner, reader);

                AlphaTexture = SmartPtr <Texture2DObject> .Read(assetsFile, owner, reader);

                SubMeshes   = reader.ReadArrayOf(r => new Submesh(reader));
                IndexBuffer = reader.ReadArray();
                reader.AlignTo(4);
                VertexData          = new VertexData(reader);
                BindPose            = reader.ReadArrayOf(r => r.ReadSingle());
                TextureRect         = new RectF(reader);
                TextureRectOffset   = new Vector2F(reader);
                AtlasRectOffset     = new Vector2F(reader);
                SettingsRaw         = reader.ReadUInt32();
                UVTransform         = new Vector4F(reader);
                DownscaleMultiplier = reader.ReadSingle();
            }
Ejemplo n.º 9
0
 public void Parse(AssetsReader reader)
 {
     NumItems = reader.ReadUInt32();
     Range    = reader.ReadSingle();
     Start    = reader.ReadSingle();
     Data     = reader.ReadArrayOf(r => r.ReadByte()).ToArray();
     reader.AlignTo(4);
     BitSize = reader.ReadByte();
     reader.AlignTo(4);
 }
Ejemplo n.º 10
0
        public override void Parse(AssetsReader reader)
        {
            base.ParseBase(reader);
            Name          = reader.ReadString();
            Rect          = new RectF(reader);
            Offset        = new Vector2F(reader);
            Border        = new Vector4F(reader);
            PixelsToUnits = reader.ReadSingle();
            Pivot         = new Vector2F(reader);
            Extrude       = reader.ReadUInt32();
            IsPolygon     = reader.ReadBoolean();
            reader.AlignTo(4);
            RenderDataKey = new Map <Guid, long>(reader.ReadGuid(), reader.ReadInt64());
            AtlasTags     = reader.ReadArrayOf(r => r.ReadString());
            SpriteAtlas   = SmartPtr <AssetsObject> .Read(ObjectInfo.ParentFile, this, reader);

            RenderData   = new SpriteRenderData(ObjectInfo.ParentFile, this, reader);
            PhysicsShape = reader.ReadArrayOf(r => r.ReadArrayOf(r2 => new Vector2F(r2)));
            Bones        = reader.ReadArrayOf(r => (ISmartPtr <Transform>)SmartPtr <Transform> .Read(ObjectInfo.ParentFile, this, reader));
        }