public YAMLNode ExportYAML(IExportContainer container) { YAMLMappingNode node = new YAMLMappingNode(); node.AddSerializedVersion(ToSerializedVersion(container.ExportVersion)); node.Add(PatchesName, Patches.ExportYAML(container)); node.Add(DetailPrototypesName, DetailPrototypes.ExportYAML(container)); node.Add(PatchCountName, PatchCount); node.Add(PatchSamplesName, PatchSamples); node.Add(RandomRotationsName, RandomRotations.ExportYAML(container)); if (HasAtlasTexture(container.ExportVersion)) { node.Add(AtlasTextureName, AtlasTexture.ExportYAML(container)); } node.Add(WavingGrassTintName, WavingGrassTint.ExportYAML(container)); node.Add(WavingGrassStrengthName, WavingGrassStrength); node.Add(WavingGrassAmountName, WavingGrassAmount); node.Add(WavingGrassSpeedName, WavingGrassSpeed); if (HasDetailBillboardShader(container.ExportVersion)) { node.Add(DetailBillboardShaderName, DetailBillboardShader.ExportYAML(container)); node.Add(DetailMeshLitShaderName, DetailMeshLitShader.ExportYAML(container)); node.Add(DetailMeshGrassShaderName, DetailMeshGrassShader.ExportYAML(container)); } TreeDatabase.ExportYAML(container, node); if (!HasAtlasTexture(container.ExportVersion)) { node.Add(PreloadTextureAtlasDataName, PreloadTextureAtlasData.ExportYAML(container)); } return(node); }
public YAMLNode ExportYAML(IExportContainer container) { YAMLMappingNode node = new YAMLMappingNode(); node.AddSerializedVersion(GetSerializedVersion(container.ExportVersion)); node.Add(PatchesName, Patches.ExportYAML(container)); node.Add(DetailPrototypesName, DetailPrototypes.ExportYAML(container)); node.Add(PatchCountName, PatchCount); node.Add(PatchSamplesName, PatchSamples); node.Add(RandomRotationsName, RandomRotations.ExportYAML(container)); node.Add(WavingGrassTintName, WavingGrassTint.ExportYAML(container)); node.Add(WavingGrassStrengthName, WavingGrassStrength); node.Add(WavingGrassAmountName, WavingGrassAmount); node.Add(WavingGrassSpeedName, WavingGrassSpeed); if (IsReadDetailBillboardShader(container.ExportVersion)) { node.Add(DetailBillboardShaderName, ExportDetailBillboardShader(container)); node.Add(DetailMeshLitShaderName, ExportDetailMeshLitShader(container)); node.Add(DetailMeshGrassShaderName, ExportDetailMeshGrassShader(container)); } node.Add(TreeInstancesName, TreeInstances.ExportYAML(container)); node.Add(TreePrototypesName, TreePrototypes.ExportYAML(container)); node.Add(PreloadTextureAtlasDataName, PreloadTextureAtlasData.ExportYAML(container)); return(node); }
public void Write(AssetWriter writer) { Patches.Write(writer); DetailPrototypes.Write(writer); writer.Write(PatchCount); writer.Write(PatchSamples); RandomRotations.Write(writer); if (HasAtlasTexture(writer.Version)) { AtlasTexture.Write(writer); } WavingGrassTint.Write(writer); writer.Write(WavingGrassStrength); writer.Write(WavingGrassAmount); writer.Write(WavingGrassSpeed); if (HasDetailBillboardShader(writer.Version)) { DetailBillboardShader.Write(writer); DetailMeshLitShader.Write(writer); DetailMeshGrassShader.Write(writer); } TreeDatabase.Write(writer); if (!HasAtlasTexture(writer.Version)) { PreloadTextureAtlasData.Write(writer); } }
public YAMLNode ExportYAML(IExportContainer container) { #warning TODO: values acording to read version (current 2017.3.0f3) YAMLMappingNode node = new YAMLMappingNode(); node.AddSerializedVersion(GetSerializedVersion(container.Version)); node.Add("m_Patches", Patches.ExportYAML(container)); node.Add("m_DetailPrototypes", DetailPrototypes.ExportYAML(container)); node.Add("m_PatchCount", PatchCount); node.Add("m_PatchSamples", PatchSamples); node.Add("m_RandomRotations", RandomRotations.ExportYAML(container)); node.Add("WavingGrassTint", WavingGrassTint.ExportYAML(container)); node.Add("m_WavingGrassStrength", WavingGrassStrength); node.Add("m_WavingGrassAmount", WavingGrassAmount); node.Add("m_WavingGrassSpeed", WavingGrassSpeed); node.Add("m_TreeInstances", TreeInstances.ExportYAML(container)); node.Add("m_TreePrototypes", TreePrototypes.ExportYAML(container)); node.Add("m_PreloadTextureAtlasData", PreloadTextureAtlasData.ExportYAML(container)); return(node); }