public YAMLNode ExportYAML(IExportContainer container) { YAMLMappingNode node = new YAMLMappingNode(); node.AddSerializedVersion(ToSerializedVersion(container.ExportVersion)); node.Add(LightmapName, Lightmap.ExportYAML(container)); if (HasIndirectLightmap(container.ExportVersion)) { node.Add(IndirectLightmapName, IndirectLightmap.ExportYAML(container)); } if (HasLightInd(container.ExportVersion)) { node.Add(LightIndName, LightInd.ExportYAML(container)); node.Add(DirIndName, DirInd.ExportYAML(container)); } if (HasDirLightmap(container.ExportVersion)) { node.Add(DirLightmapName, DirLightmap.ExportYAML(container)); } if (HasShadowMask(container.ExportVersion)) { node.Add(ShadowMaskName, ShadowMask.ExportYAML(container)); } return(node); }
public void Write(AssetWriter writer) { Lightmap.Write(writer); if (HasIndirectLightmap(writer.Version)) { IndirectLightmap.Write(writer); } if (HasLightInd(writer.Version)) { LightInd.Write(writer); DirInd.Write(writer); } if (HasDirLightmap(writer.Version)) { DirLightmap.Write(writer); ShadowMask.Write(writer); } }
public void Read(AssetReader reader) { Lightmap.Read(reader); if (HasIndirectLightmap(reader.Version)) { IndirectLightmap.Read(reader); } if (HasLightInd(reader.Version)) { LightInd.Read(reader); DirInd.Read(reader); } if (HasDirLightmap(reader.Version)) { DirLightmap.Read(reader); ShadowMask.Read(reader); } }