protected override YAMLMappingNode ExportYAMLRoot(IExportContainer container) { #warning TODO: values acording to read version (current 2017.3.0f3) YAMLMappingNode node = base.ExportYAMLRoot(container); node.AddSerializedVersion(GetSerializedVersion(container.Version)); node.Add("m_GIWorkflowMode", GetExportGIWorkflowMode(container.Version, container.Flags)); node.Add("m_GISettings", GetExportGISettings(container.Version).ExportYAML(container)); node.Add("m_LightmapEditorSettings", GetExportLightmapEditorSettings(container.Version, container.Flags).ExportYAML(container)); #warning is that possible to somehow create LightingDataAsset with Release data? node.Add("m_LightingDataAsset", LightingDataAsset.ExportYAML(container)); node.Add("m_UseShadowmask", GetExportUseShadowmask(container.Version)); return(node); }
protected override YAMLMappingNode ExportYAMLRoot(IAssetsExporter exporter) { #warning TODO: values acording to read version (current 2017.3.0f3) #warning TODO: convert data YAMLMappingNode node = base.ExportYAMLRoot(exporter); node.AddSerializedVersion(GetSerializedVersion(exporter.Version)); node.Add("m_GIWorkflowMode", GIWorkflowMode); node.Add("m_GISettings", GISettings.ExportYAML(exporter)); node.Add("m_LightmapEditorSettings", LightmapEditorSettings.ExportYAML(exporter)); node.Add("m_LightingDataAsset", LightingDataAsset.ExportYAML(exporter)); node.Add("m_UseShadowmask", 0); 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; } } }