Exemplo n.º 1
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);
        }
Exemplo n.º 2
0
 private void Parse(AssetsReader reader)
 {
     Version    = reader.ReadInt16();
     Depth      = reader.ReadSByte();
     IsArray    = reader.ReadBoolean();
     TypeOffset = reader.ReadInt32();
     NameOffset = reader.ReadInt32();
     Size       = reader.ReadInt32();
     Index      = reader.ReadInt32();
     Flags      = reader.ReadInt32();
 }
Exemplo n.º 3
0
 private void Parse(AssetsReader reader, bool hasTypeTree)
 {
     ClassID  = reader.ReadInt32();
     Unknown1 = reader.ReadSByte();
     Unknown2 = reader.ReadInt16();
     if (IsScriptType)
     {
         ScriptHash = reader.ReadGuid();
     }
     TypeHash = reader.ReadGuid();
     if (hasTypeTree)
     {
         TypeTree = new TypeTree(reader);
     }
 }