示例#1
0
        public override void Read(AssetReader reader)
        {
            base.Read(reader);

            if (HasLightProbesLegacy(reader.Version))
            {
                LightProbesLegacy.Read(reader);
            }
            if (HasEnlightenSceneMapping(reader.Version, reader.Flags))
            {
                EnlightenSceneMapping.Read(reader);
            }
            if (HasGIWorkflowMode(reader.Version, reader.Flags))
            {
                GIWorkflowMode = (GIWorkflowMode)reader.ReadInt32();
            }
            if (HasLightProbes(reader.Version, reader.Flags))
            {
                LightProbes.Read(reader);
            }
            if (HasLightmaps(reader.Version, reader.Flags))
            {
                Lightmaps = reader.ReadAssetArray <LightmapData>();
            }
            if (IsAlign1(reader.Version, reader.Flags))
            {
                reader.AlignStream();
            }

            if (HasLightmapsModeLegacy(reader.Version))
            {
                LightmapsModeLegacy = (LightmapsMode)reader.ReadInt32();
            }
            if (HasLightmapsMode(reader.Version, reader.Flags))
            {
                LightmapsMode = (LightmapsMode)reader.ReadInt32();
            }
            if (HasBakedColorSpace(reader.Version))
            {
                BakedColorSpace = (ColorSpace)reader.ReadInt32();
            }
            if (HasUseDualLightmapsInForward(reader.Version))
            {
                UseDualLightmapsInForward = reader.ReadBoolean();
            }
            if (IsAlign2(reader.Version))
            {
                reader.AlignStream();
            }

            if (HasGISettings(reader.Version))
            {
                GISettings.Read(reader);
            }

#if UNIVERSAL
            if (HasLightmapEditorSettings(reader.Version, reader.Flags))
            {
                LightmapEditorSettings.Read(reader);
            }
            if (HasLightingDataAsset(reader.Version, reader.Flags))
            {
                LightingDataAsset.Read(reader);
            }
#endif
            if (HasRuntimeCPUUsage(reader.Version))
            {
                RuntimeCPUUsage = reader.ReadInt32();
            }
            if (HasUseShadowmask(reader.Version))
            {
                if (IsBoolShadowmask(reader.Version))
                {
                    UseShadowmask = reader.ReadBoolean();
                }
                else
                {
                    ShadowMaskMode = reader.ReadInt32();
                }
            }
        }
示例#2
0
        public override void Read(AssetReader reader)
        {
            base.Read(reader);

            if (IsReadEnlightenSceneMapping(reader.Version, reader.Flags))
            {
                EnlightenSceneMapping.Read(reader);
            }
            if (IsReadGIWorkflowMode(reader.Version, reader.Flags))
            {
                GIWorkflowMode = reader.ReadInt32();
            }

            if (IsReadLightProbes(reader.Version, reader.Flags))
            {
                LightProbes.Read(reader);
            }
            if (IsReadLightmaps(reader.Flags))
            {
                m_lightmaps = reader.ReadAssetArray <LightmapData>();
            }
            if (IsAlign1(reader.Version, reader.Flags))
            {
                reader.AlignStream(AlignType.Align4);
            }

            if (IsReadLightmapsMode(reader.Version, reader.Flags))
            {
                LightmapsMode = (LightmapsMode)reader.ReadInt32();
            }
            if (IsReadBakedColorSpace(reader.Version))
            {
                BakedColorSpace = reader.ReadInt32();
            }
            if (IsReadUseDualLightmapsInForward(reader.Version))
            {
                UseDualLightmapsInForward = reader.ReadBoolean();
            }
            if (IsAlign2(reader.Version))
            {
                reader.AlignStream(AlignType.Align4);
            }

            if (IsReadGISettings(reader.Version))
            {
                GISettings.Read(reader);
            }

            if (IsReadLightmapEditorSettings(reader.Version, reader.Flags))
            {
                LightmapEditorSettings.Read(reader);
            }
            if (IsReadLightingDataAsset(reader.Version, reader.Flags))
            {
                LightingDataAsset.Read(reader);
            }
            if (IsReadRuntimeCPUUsage(reader.Version))
            {
                RuntimeCPUUsage = reader.ReadInt32();
            }
            if (IsReadUseShadowmask(reader.Version))
            {
                if (IsBoolShadowmask(reader.Version))
                {
                    UseShadowmask = reader.ReadBoolean();
                }
                else
                {
                    UseShadowmask = reader.ReadInt32() == 0 ? false : true;
                }
            }
        }