Exemplo n.º 1
0
        protected override YAMLMappingNode ExportYAMLRoot(IExportContainer container)
        {
#warning TODO: serialized version acording to read version (current 2017.3.0f3)
            YAMLMappingNode node = base.ExportYAMLRoot(container);
            node.Add("m_Enabled", Enabled);
            node.Add("m_CastShadows", (byte)CastShadows);
            node.Add("m_ReceiveShadows", ReceiveShadows);
            node.Add("m_DynamicOccludee", GetDynamicOccludee(container.Version));
            node.Add("m_MotionVectors", (byte)GetMotionVectors(container.Version));
            node.Add("m_LightProbeUsage", (byte)LightProbeUsage);
            node.Add("m_ReflectionProbeUsage", (byte)GetReflectionProbeUsage(container.Version));
            node.Add("m_Materials", Materials.ExportYAML(container));
            node.Add("m_StaticBatchInfo", GetStaticBatchInfo(container.Version).ExportYAML(container));
            node.Add("m_StaticBatchRoot", StaticBatchRoot.ExportYAML(container));
            node.Add("m_ProbeAnchor", ProbeAnchor.ExportYAML(container));
            node.Add("m_LightProbeVolumeOverride", LightProbeVolumeOverride.ExportYAML(container));
            node.Add("m_ScaleInLightmap", GetScaleInLightmap(container.Flags));
            node.Add("m_PreserveUVs", GetPreserveUVs(container.Flags));
            node.Add("m_IgnoreNormalsForChartDetection", GetIgnoreNormalsForChartDetection(container.Flags));
            node.Add("m_ImportantGI", GetImportantGI(container.Flags));
            node.Add("m_StitchLightmapSeams", GetStitchLightmapSeams(container.Flags));
            node.Add("m_SelectedEditorRenderState", (int)GetSelectedEditorRenderState(container.Flags));
            node.Add("m_MinimumChartSize", GetMinimumChartSize(container.Flags));
            node.Add("m_AutoUVMaxDistance", GetAutoUVMaxDistance(container.Flags));
            node.Add("m_AutoUVMaxAngle", GetAutoUVMaxAngle(container.Flags));
            node.Add("m_LightmapParameters", GetLightmapParameters(container.Flags).ExportYAML(container));
            node.Add("m_SortingLayerID", SortingLayerID);
            node.Add("m_SortingLayer", SortingLayer);
            node.Add("m_SortingOrder", SortingOrder);
            return(node);
        }
Exemplo n.º 2
0
        protected override YAMLMappingNode ExportYAMLRoot(IExportContainer container)
        {
#warning TODO: serialized version acording to read version (current 2017.3.0f3)
            YAMLMappingNode node = base.ExportYAMLRoot(container);
            node.Add(EnabledName, Enabled);
            node.Add(CastShadowsName, (byte)CastShadows);
            node.Add(CastShadowsName, ReceiveShadows);
            node.Add(DynamicOccludeeName, GetDynamicOccludee(container.Version));
            node.Add(MotionVectorsName, (byte)GetMotionVectors(container.Version));
            node.Add(LightProbeUsageName, (byte)LightProbeUsage);
            node.Add(ReflectionProbeUsageName, (byte)GetReflectionProbeUsage(container.Version));
            node.Add(MaterialsName, Materials.ExportYAML(container));
            node.Add(StaticBatchInfoName, GetStaticBatchInfo(container.Version).ExportYAML(container));
            node.Add(StaticBatchRootName, StaticBatchRoot.ExportYAML(container));
            node.Add(ProbeAnchorName, ProbeAnchor.ExportYAML(container));
            node.Add(LightProbeVolumeOverrideName, LightProbeVolumeOverride.ExportYAML(container));
            node.Add(ScaleInLightmapName, GetScaleInLightmap(container.Flags));
            node.Add(PreserveUVsName, GetPreserveUVs(container.Flags));
            node.Add(IgnoreNormalsForChartDetectionName, GetIgnoreNormalsForChartDetection(container.Flags));
            node.Add(ImportantGIName, GetImportantGI(container.Flags));
            node.Add(StitchLightmapSeamsName, GetStitchLightmapSeams(container.Flags));
            node.Add(SelectedEditorRenderStateName, (int)GetSelectedEditorRenderState(container.Flags));
            node.Add(MinimumChartSizeName, GetMinimumChartSize(container.Flags));
            node.Add(AutoUVMaxDistanceName, GetAutoUVMaxDistance(container.Flags));
            node.Add(AutoUVMaxAngleName, GetAutoUVMaxAngle(container.Flags));
            node.Add(LightmapParametersName, GetLightmapParameters(container.Flags).ExportYAML(container));
            node.Add(SortingLayerIDName, SortingLayerID);
            node.Add(SortingLayerName, SortingLayer);
            node.Add(SortingOrderName, SortingOrder);
            return(node);
        }
Exemplo n.º 3
0
        protected override YAMLMappingNode ExportYAMLRoot(IAssetsExporter exporter)
        {
#warning TODO: check undefined vars
#warning TODO: serialized version acording to read version (current 2017.3.0f3)
            YAMLMappingNode node = base.ExportYAMLRoot(exporter);
            node.Add("m_Enabled", Enabled);
            node.Add("m_CastShadows", CastShadows);
            node.Add("m_ReceiveShadows", ReceiveShadows);
            if (IsReadDynamicOccludee(exporter.Version))
            {
#warning TODO:
                node.Add("m_DynamicOccludee", 1);
            }
            else
            {
                node.Add("m_DynamicOccludee", 1);
            }
            node.Add("m_MotionVectors", MotionVectors);
            node.Add("m_LightProbeUsage", LightProbeUsage);
            node.Add("m_ReflectionProbeUsage", ReflectionProbeUsage);
            node.Add("m_Materials", Materials.ExportYAML(exporter));
            if (IsReadSubsetIndices(exporter.Version))
            {
                StaticBatchInfo staticBatchInfo = new StaticBatchInfo(SubsetIndices);
                node.Add("m_StaticBatchInfo", staticBatchInfo.ExportYAML(exporter));
            }
            else
            {
                node.Add("m_StaticBatchInfo", StaticBatchInfo.ExportYAML(exporter));
            }
            node.Add("m_StaticBatchRoot", StaticBatchRoot.ExportYAML(exporter));
            node.Add("m_ProbeAnchor", ProbeAnchor.ExportYAML(exporter));
            node.Add("m_LightProbeVolumeOverride", LightProbeVolumeOverride.ExportYAML(exporter));
#warning what are those vars?
            node.Add("m_ScaleInLightmap", 1);
            node.Add("m_PreserveUVs", 0);
            node.Add("m_IgnoreNormalsForChartDetection", 0);
            node.Add("m_ImportantGI", 0);
#warning TODO? Should I read this parameter or just write default value?
            node.Add("m_StitchLightmapSeams", 0);
            node.Add("m_SelectedEditorRenderState", 3);
            node.Add("m_MinimumChartSize", 4);
            node.Add("m_AutoUVMaxDistance", 0.5f);
            node.Add("m_AutoUVMaxAngle", 89);
#warning TODO?
            node.Add("m_LightmapParameters", default(PPtr <Object>).ExportYAML(exporter));
            node.Add("m_SortingLayerID", SortingLayerID);
            node.Add("m_SortingLayer", SortingLayer);
            node.Add("m_SortingOrder", SortingOrder);
            return(node);
        }
        protected override YAMLMappingNode ExportYAMLRoot(IExportContainer container)
        {
            YAMLMappingNode node = base.ExportYAMLRoot(container);

            node.Add(EnabledName, GetEnabled(container.Version));
            node.Add(CastShadowsName, (byte)GetCastShadows(container.Version));
            node.Add(ReceiveShadowsName, GetReceiveShadows(container.Version));
            node.Add(DynamicOccludeeName, GetDynamicOccludee(container.Version));
            node.Add(MotionVectorsName, (byte)GetMotionVectors(container.Version));
            node.Add(LightProbeUsageName, (byte)LightProbeUsage);
            node.Add(ReflectionProbeUsageName, (byte)GetReflectionProbeUsage(container.Version));
            if (HasRayTracingMode(container.ExportVersion))
            {
                node.Add(RayTracingModeName, (byte)RayTracingMode);
            }
            if (HasRenderingLayerMask(container.ExportVersion))
            {
                node.Add(RenderingLayerMaskName, GetRenderingLayerMask(container.Version));
            }
            if (HasRendererPriority(container.ExportVersion))
            {
                node.Add(RendererPriorityName, RendererPriority);
            }
            node.Add(MaterialsName, Materials.ExportYAML(container));
            node.Add(StaticBatchInfoName, GetStaticBatchInfo(container.Version).ExportYAML(container));
            node.Add(StaticBatchRootName, StaticBatchRoot.ExportYAML(container));
            node.Add(ProbeAnchorName, ProbeAnchor.ExportYAML(container));
            node.Add(LightProbeVolumeOverrideName, LightProbeVolumeOverride.ExportYAML(container));
            node.Add(ScaleInLightmapName, GetScaleInLightmap(container.Version, container.Flags));
            if (HasReceiveGI(container.ExportVersion, container.ExportFlags))
            {
                node.Add(ReceiveGIName, (int)GetReceiveGI(container.Version, container.Flags));
            }
            node.Add(PreserveUVsName, GetPreserveUVs(container.Version, container.Flags));
            node.Add(IgnoreNormalsForChartDetectionName, GetIgnoreNormalsForChartDetection(container.Version, container.Flags));
            node.Add(ImportantGIName, GetImportantGI(container.Version, container.Flags));
            node.Add(StitchLightmapSeamsName, GetStitchLightmapSeams(container.Version, container.Flags));
            node.Add(SelectedEditorRenderStateName, (int)GetSelectedEditorRenderState(container.Version, container.Flags));
            node.Add(MinimumChartSizeName, GetMinimumChartSize(container.Version, container.Flags));
            node.Add(AutoUVMaxDistanceName, GetAutoUVMaxDistance(container.Version, container.Flags));
            node.Add(AutoUVMaxAngleName, GetAutoUVMaxAngle(container.Version, container.Flags));
            node.Add(LightmapParametersName, GetLightmapParameters().ExportYAML(container));
            node.Add(SortingLayerIDName, SortingLayerID);
            node.Add(SortingLayerName, SortingLayer);
            node.Add(SortingOrderName, SortingOrder);
            return(node);
        }
Exemplo n.º 5
0
        protected override YAMLMappingNode ExportYAMLRoot()
        {
#warning TODO: check undefined vars
#warning TODO: write according to version
            YAMLMappingNode node = base.ExportYAMLRoot();
            node.Add("m_Enabled", Enabled);
            node.Add("m_CastShadows", CastShadows);
            node.Add("m_ReceiveShadows", ReceiveShadows);
            if (IsReadDynamicOccludee)
            {
#warning TODO:
                node.Add("m_DynamicOccludee", 1);
            }
            else
            {
                node.Add("m_DynamicOccludee", 1);
            }
            node.Add("m_MotionVectors", MotionVectors);
            node.Add("m_LightProbeUsage", LightProbeUsage);
            node.Add("m_ReflectionProbeUsage", ReflectionProbeUsage);
            node.Add("m_Materials", Materials.ExportYAML());
            node.Add("m_StaticBatchInfo", StaticBatchInfo.ExportYAML());
            node.Add("m_StaticBatchRoot", StaticBatchRoot.ExportYAML());
            node.Add("m_ProbeAnchor", ProbeAnchor.ExportYAML());
            node.Add("m_LightProbeVolumeOverride", LightProbeVolumeOverride.ExportYAML());
#warning what are those vars?
            node.Add("m_ScaleInLightmap", 1);
            node.Add("m_PreserveUVs", 0);
            node.Add("m_IgnoreNormalsForChartDetection", 0);
            node.Add("m_ImportantGI", 0);
#warning TODO? is read this parameter or just write default value?
            node.Add("m_StitchLightmapSeams", 0);
            node.Add("m_SelectedEditorRenderState", 3);
            node.Add("m_MinimumChartSize", 4);
            node.Add("m_AutoUVMaxDistance", 0.5f);
            node.Add("m_AutoUVMaxAngle", 89);
            node.Add("m_LightmapParameters", PPtr <Object> .Empty.ExportYAML());
            node.Add("m_SortingLayerID", SortingLayerID);
            node.Add("m_SortingLayer", SortingLayer);
            node.Add("m_SortingOrder", SortingOrder);
            return(node);
        }