public override IEnumerable <Object> FetchDependencies(ISerializedFile file, bool isLog = false) { foreach (Object @object in base.FetchDependencies(file, isLog)) { yield return(@object); } yield return(Scene.FetchDependency(file, isLog, ToLogString, "m_Scene")); foreach (LightmapData lightmapData in Lightmaps) { foreach (Object @object in lightmapData.FetchDependencies(file, isLog)) { yield return(@object); } } yield return(LightProbes.FetchDependency(file, isLog, ToLogString, "m_LightProbes")); foreach (RendererData rendererData in LightmappedRendererData) { foreach (Object @object in rendererData.FetchDependencies(file, isLog)) { yield return(@object); } } foreach (Object @object in EnlightenSceneMapping.FetchDependencies(file, isLog)) { yield return(@object); } foreach (PPtr <Texture> cubemap in BakedReflectionProbeCubemaps) { yield return(cubemap.FetchDependency(file, isLog, ToLogString, "m_BakedReflectionProbeCubemaps")); } }
public override void Read(AssetStream stream) { base.Read(stream); Scene.Read(stream); if (IsReadLightmaps(stream.Flags)) { m_lightmaps = stream.ReadArray <LightmapData>(); stream.AlignStream(AlignType.Align4); LightProbes.Read(stream); LightmapsMode = stream.ReadInt32(); BakedAmbientProbeInLinear.Read(stream); m_lightmappedRendererData = stream.ReadArray <RendererData>(); stream.AlignStream(AlignType.Align4); m_lightmappedRendererDataIDs = stream.ReadArray <SceneObjectIdentifier>(); stream.AlignStream(AlignType.Align4); EnlightenSceneMapping.Read(stream); m_enlightenSceneMappingRendererIDs = stream.ReadArray <SceneObjectIdentifier>(); stream.AlignStream(AlignType.Align4); m_lights = stream.ReadArray <SceneObjectIdentifier>(); stream.AlignStream(AlignType.Align4); m_lightBakingOutputs = stream.ReadArray <LightBakingOutput>(); stream.AlignStream(AlignType.Align4); m_bakedReflectionProbeCubemaps = stream.ReadArray <PPtr <Texture> >(); m_bakedReflectionProbes = stream.ReadArray <SceneObjectIdentifier>(); stream.AlignStream(AlignType.Align4); if (IsReadEnlightenData(stream.Flags)) { m_enlightenData = stream.ReadByteArray(); stream.AlignStream(AlignType.Align4); } EnlightenDataVersion = stream.ReadInt32(); } }
protected override YAMLMappingNode ExportYAMLRoot(IExportContainer container) { YAMLMappingNode node = base.ExportYAMLRoot(container); node.Add("m_Scene", Scene.ExportYAML(container)); node.Add("m_Lightmaps", Lightmaps.ExportYAML(container)); node.Add("m_LightProbes", LightProbes.ExportYAML(container)); node.Add("m_LightmapsMode", LightmapsMode); node.Add("m_BakedAmbientProbeInLinear", BakedAmbientProbeInLinear.ExportYAML(container)); node.Add("m_LightmappedRendererData", LightmappedRendererData.ExportYAML(container)); node.Add("m_LightmappedRendererDataIDs", LightmappedRendererDataIDs.ExportYAML(container)); node.Add("m_EnlightenSceneMapping", EnlightenSceneMapping.ExportYAML(container)); node.Add("m_EnlightenSceneMappingRendererIDs", EnlightenSceneMappingRendererIDs.ExportYAML(container)); node.Add("m_Lights", Lights.ExportYAML(container)); node.Add("m_LightBakingOutputs", LightBakingOutputs.ExportYAML(container)); node.Add("m_BakedReflectionProbeCubemaps", BakedReflectionProbeCubemaps.ExportYAML(container)); node.Add("m_BakedReflectionProbes", BakedReflectionProbes.ExportYAML(container)); node.Add("m_EnlightenData", EnlightenData.ExportYAML()); node.Add("m_EnlightenDataVersion", EnlightenDataVersion); return(node); }
public override IEnumerable <Object> FetchDependencies(ISerializedFile file, bool isLog = false) { foreach (Object @object in base.FetchDependencies(file, isLog)) { yield return(@object); } if (IsReadEnlightenSceneMapping(file.Version, file.Flags)) { foreach (Object @object in EnlightenSceneMapping.FetchDependencies(file, isLog)) { yield return(@object); } } if (IsReadLightProbes(file.Version, file.Flags)) { yield return(LightProbes.FetchDependency(file, isLog, ToLogString, "m_LightProbes")); foreach (LightmapData lightmap in Lightmaps) { foreach (Object @object in lightmap.FetchDependencies(file, isLog)) { yield return(@object); } } } if (IsReadLightmapEditorSettings(file.Version, file.Flags)) { foreach (Object @object in LightmapEditorSettings.FetchDependencies(file, isLog)) { yield return(@object); } } if (IsReadLightingDataAsset(file.Version, file.Flags)) { yield return(LightingDataAsset.FetchDependency(file, isLog, ToLogString, "m_LightingDataAsset")); } }
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.ReadArray <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; } } }