public override void Read(AssetReader reader) { base.Read(reader); Scene.Read(reader); m_lightmaps = reader.ReadAssetArray <LightmapData>(); reader.AlignStream(AlignType.Align4); if (IsReadAOTextures(reader.Version)) { m_AOTextures = reader.ReadAssetArray <PPtr <Texture2D> >(); } if (IsReadLightmapsCacheFiles(reader.Version)) { m_lightmapsCacheFiles = reader.ReadStringArray(); } LightProbes.Read(reader); LightmapsMode = reader.ReadInt32(); BakedAmbientProbeInLinear.Read(reader); m_lightmappedRendererData = reader.ReadAssetArray <RendererData>(); reader.AlignStream(AlignType.Align4); m_lightmappedRendererDataIDs = reader.ReadAssetArray <SceneObjectIdentifier>(); reader.AlignStream(AlignType.Align4); EnlightenSceneMapping.Read(reader); m_enlightenSceneMappingRendererIDs = reader.ReadAssetArray <SceneObjectIdentifier>(); reader.AlignStream(AlignType.Align4); m_lights = reader.ReadAssetArray <SceneObjectIdentifier>(); reader.AlignStream(AlignType.Align4); m_lightBakingOutputs = reader.ReadAssetArray <LightBakingOutput>(); reader.AlignStream(AlignType.Align4); if (IsReadBakedReflectionProbeCubemapCacheFiles(reader.Version)) { m_bakedReflectionProbeCubemapCacheFiles = reader.ReadStringArray(); } m_bakedReflectionProbeCubemaps = reader.ReadAssetArray <PPtr <Texture> >(); m_bakedReflectionProbes = reader.ReadAssetArray <SceneObjectIdentifier>(); reader.AlignStream(AlignType.Align4); m_enlightenData = reader.ReadByteArray(); reader.AlignStream(AlignType.Align4); EnlightenDataVersion = reader.ReadInt32(); }
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(); } } }
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; } } }