Ejemplo n.º 1
0
        protected override YAMLMappingNode ExportYAMLRoot(IExportContainer container)
        {
            YAMLMappingNode node = base.ExportYAMLRoot(container);

            node.AddSerializedVersion(GetSerializedVersion(container.Version));
            node.Add("m_TerrainData", TerrainData.ExportYAML(container));
            node.Add("m_TreeDistance", TreeDistance);
            node.Add("m_TreeBillboardDistance", TreeBillboardDistance);
            node.Add("m_TreeCrossFadeLength", TreeCrossFadeLength);
            node.Add("m_TreeMaximumFullLODCount", TreeMaximumFullLODCount);
            node.Add("m_DetailObjectDistance", DetailObjectDistance);
            node.Add("m_DetailObjectDensity", DetailObjectDensity);
            node.Add("m_HeightmapPixelError", HeightmapPixelError);
            node.Add("m_SplatMapDistance", SplatMapDistance);
            node.Add("m_HeightmapMaximumLOD", HeightmapMaximumLOD);
            node.Add("m_CastShadows", CastShadows);
            node.Add("m_DrawHeightmap", DrawHeightmap);
            node.Add("m_DrawTreesAndFoliage", DrawTreesAndFoliage);
            node.Add("m_ReflectionProbeUsage", ReflectionProbeUsage);
            node.Add("m_MaterialType", MaterialType);
            node.Add("m_LegacySpecular", LegacySpecular.ExportYAML(container));
            node.Add("m_LegacyShininess", LegacyShininess);
            node.Add("m_MaterialTemplate", MaterialTemplate.ExportYAML(container));
            node.Add("m_BakeLightProbesForTrees", BakeLightProbesForTrees);
#warning TODO: get lightmap by index and fill those values
            node.Add("m_ScaleInLightmap", 0.0512f);
            node.Add("m_LightmapParameters", default(PPtr <Object>).ExportYAML(container));
            return(node);
        }
Ejemplo n.º 2
0
        protected override YAMLMappingNode ExportYAMLRoot(IExportContainer container)
        {
            YAMLMappingNode node = base.ExportYAMLRoot(container);

            node.Add("m_TerrainData", TerrainData.ExportYAML(container));
            node.Add("m_EnableTreeColliders", EnableTreeColliders);
            return(node);
        }
Ejemplo n.º 3
0
        protected override YAMLMappingNode ExportYAMLRoot(IExportContainer container)
        {
            YAMLMappingNode node = base.ExportYAMLRoot(container);

            node.AddSerializedVersion(GetSerializedVersion(container.ExportVersion));
            node.Add(TerrainDataName, TerrainData.ExportYAML(container));
            node.Add(TreeDistanceName, TreeDistance);
            node.Add(TreeBillboardDistanceName, TreeBillboardDistance);
            node.Add(TreeCrossFadeLengthName, TreeCrossFadeLength);
            node.Add(TreeMaximumFullLODCountName, TreeMaximumFullLODCount);
            node.Add(DetailObjectDistanceName, DetailObjectDistance);
            node.Add(DetailObjectDensityName, DetailObjectDensity);
            node.Add(HeightmapPixelErrorName, HeightmapPixelError);
            node.Add(SplatMapDistanceName, SplatMapDistance);
            node.Add(HeightmapMaximumLODName, HeightmapMaximumLOD);
            if (IsReadShadowCastingMode(container.ExportVersion))
            {
                node.Add(ShadowCastingModeName, (int)ShadowCastingMode);
            }
            else
            {
                node.Add(CastShadowsName, CastShadows);
            }
            node.Add(DrawHeightmapName, DrawHeightmap);
            if (IsReadDrawInstanced(container.ExportVersion))
            {
                node.Add(DrawInstancedName, DrawInstanced);
            }
            node.Add(DrawTreesAndFoliageName, DrawTreesAndFoliage);
            node.Add(ReflectionProbeUsageName, (int)ReflectionProbeUsage);
            if (IsReadMaterialType(container.ExportVersion))
            {
                node.Add(MaterialTypeName, (int)GetMaterialType(container.Version));
                node.Add(LegacySpecularName, LegacySpecular.ExportYAML(container));
                node.Add(LegacyShininessName, LegacyShininess);
            }
            node.Add(MaterialTemplateName, ExportMaterialTemplate(container));
            node.Add(BakeLightProbesForTreesName, BakeLightProbesForTrees);
            if (IsReadPreserveTreePrototypeLayers(container.ExportVersion))
            {
                node.Add(PreserveTreePrototypeLayersName, PreserveTreePrototypeLayers);
            }
            if (IsReadDeringLightProbesForTrees(container.ExportVersion, container.ExportFlags))
            {
                node.Add(DeringLightProbesForTreesName, GetDeringLightProbesForTrees(container.Version, container.Flags));
            }
#warning TODO: get lightmap by index and fill those values
            node.Add(ScaleInLightmapName, GetScaleInLightmap(container.Flags));
            node.Add(LightmapParametersName, GetLightmapParameters(container.Flags).ExportYAML(container));
            if (IsReadGroupingID(container.ExportVersion))
            {
                node.Add(GroupingIDName, GroupingID);
                node.Add(AllowAutoConnectName, AllowAutoConnect);
            }
            return(node);
        }