Example #1
0
        public override YAMLNode ExportYAML(IExportContainer container)
        {
            YAMLMappingNode node = (YAMLMappingNode)base.ExportYAML(container);

            node.AddSerializedVersion(GetSerializedVersion(container.ExportVersion));
            node.Add(RateOverTimeName, RateOverTime.ExportYAML(container));
            node.Add(RateOverDistanceName, RateOverDistance.ExportYAML(container));
            node.Add(BurstCountName, BurstCount);
            node.Add(BurstsName, Bursts.ExportYAML(container));
            return(node);
        }
Example #2
0
        public override YAMLNode ExportYAML(IExportContainer container)
        {
#warning TODO: values acording to read version (current 2017.3.0f3)
            YAMLMappingNode node = (YAMLMappingNode)base.ExportYAML(container);
            node.AddSerializedVersion(GetSerializedVersion(container.Version));
            node.Add("rateOverTime", RateOverTime.ExportYAML(container));
            node.Add("rateOverDistance", RateOverDistance.ExportYAML(container));
            node.Add("m_BurstCount", BurstCount);
            node.Add("m_Bursts", Bursts.ExportYAML(container));
            return(node);
        }
        public override YAMLNode ExportYAML(IAssetsExporter exporter)
        {
#warning TODO: values acording to read version (current 2017.3.0f3)
            YAMLMappingNode node = (YAMLMappingNode)base.ExportYAML(exporter);
            node.AddSerializedVersion(GetSerializedVersion(exporter.Version));
            node.Add("rateOverTime", RateOverTime.ExportYAML(exporter));
            node.Add("rateOverDistance", RateOverDistance.ExportYAML(exporter));
            node.Add("m_BurstCount", BurstCount);
            if (IsReadBursts(exporter.Version))
            {
                node.Add("m_Bursts", Bursts.ExportYAML(exporter));
            }
            else if (Config.IsExportTopmostSerializedVersion)
            {
                ParticleSystemEmissionBurst[] bursts = new ParticleSystemEmissionBurst[4];
                bursts[0] = new ParticleSystemEmissionBurst(Time0, Cnt0, IsReadCntMax(exporter.Version) ? CntMax0 : Cnt0);
                bursts[1] = new ParticleSystemEmissionBurst(Time1, Cnt1, IsReadCntMax(exporter.Version) ? CntMax1 : Cnt1);
                bursts[2] = new ParticleSystemEmissionBurst(Time2, Cnt2, IsReadCntMax(exporter.Version) ? CntMax2 : Cnt2);
                bursts[3] = new ParticleSystemEmissionBurst(Time3, Cnt3, IsReadCntMax(exporter.Version) ? CntMax3 : Cnt3);
                node.Add("m_Bursts", bursts.ExportYAML(exporter));
            }
            return(node);
        }