Beispiel #1
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.InsertSerializedVersion(GetSerializedVersion(container.Version));
            node.Add("type", (int)Type);
            node.Add("angle", Angle);
            node.Add("length", GetExportLength(container.Version));
            node.Add("boxThickness", BoxThickness.ExportYAML(container));
            node.Add("radiusThickness", GetExportRadiusThickness(container.Version));
            node.Add("donutRadius", GetExportDonutRadius(container.Version));
            node.Add("m_Position", Position.ExportYAML(container));
            node.Add("m_Rotation", Rotation.ExportYAML(container));
            node.Add("m_Scale", GetExportScale(container.Version).ExportYAML(container));
            node.Add("placementMode", PlacementMode);
            node.Add("m_MeshMaterialIndex", MeshMaterialIndex);
            node.Add("m_MeshNormalOffset", MeshNormalOffset);
            node.Add("m_Mesh", Mesh.ExportYAML(container));
            node.Add("m_MeshRenderer", MeshRenderer.ExportYAML(container));
            node.Add("m_SkinnedMeshRenderer", SkinnedMeshRenderer.ExportYAML(container));
            node.Add("m_UseMeshMaterialIndex", UseMeshMaterialIndex);
            node.Add("m_UseMeshColors", GetExportUseMeshColors(container.Version));
            node.Add("alignToDirection", AlignToDirection);
            node.Add("randomDirectionAmount", RandomDirectionAmount);
            node.Add("sphericalDirectionAmount", SphericalDirectionAmount);
            node.Add("randomPositionAmount", RandomPositionAmount);
            node.Add("radius", GetExportRadius(container.Version).ExportYAML(container));
            node.Add("arc", GetExportArc(container.Version).ExportYAML(container));
            return(node);
        }
Beispiel #2
0
        public override YAMLNode ExportYAML(IExportContainer container)
        {
            YAMLMappingNode node = (YAMLMappingNode)base.ExportYAML(container);

            node.InsertSerializedVersion(ToSerializedVersion(container.ExportVersion));
            node.Add(TypeName, (int)GetType(container.Version));
            node.Add(AngleName, Angle);
            node.Add(LengthName, GetExportLength(container.Version));
            node.Add(BoxThicknessName, BoxThickness.ExportYAML(container));
            node.Add(RadiusThicknessName, GetExportRadiusThickness(container.Version));
            node.Add(DonutRadiusName, GetExportDonutRadius(container.Version));
            node.Add(PositionName, Position.ExportYAML(container));
            node.Add(RotationName, Rotation.ExportYAML(container));
            node.Add(ScaleName, Scale.ExportYAML(container));
            node.Add(PlacementModeName, (int)PlacementMode);
            node.Add(MeshMaterialIndexName, MeshMaterialIndex);
            node.Add(MeshNormalOffsetName, MeshNormalOffset);
            if (HasMeshSpawn(container.Version))
            {
                node.Add(MeshSpawnName, MeshSpawn.ExportYAML(container));
            }
            node.Add(MeshName, Mesh.ExportYAML(container));
            node.Add(MeshRendererName, MeshRenderer.ExportYAML(container));
            node.Add(SkinnedMeshRendererName, SkinnedMeshRenderer.ExportYAML(container));
            node.Add(UseMeshMaterialIndexName, UseMeshMaterialIndex);
            node.Add(UseMeshColorsName, GetExportUseMeshColors(container.Version));
            node.Add(AlignToDirectionName, AlignToDirection);
            node.Add(RandomDirectionAmountName, RandomDirectionAmount);
            node.Add(SphericalDirectionAmountName, SphericalDirectionAmount);
            node.Add(RandomPositionAmountName, RandomPositionAmount);
            node.Add(RadiusName, Radius.ExportYAML(container));
            node.Add(ArcName, GetArc(container.Version).ExportYAML(container));
            return(node);
        }