protected override YAMLMappingNode ExportYAMLRoot(IExportContainer container) { YAMLMappingNode node = base.ExportYAMLRoot(container); node.Add("m_LocalRotation", LocalRotation.ExportYAML(container)); node.Add("m_LocalPosition", LocalPosition.ExportYAML(container)); node.Add("m_LocalScale", LocalScale.ExportYAML(container)); node.Add("m_Children", Children.ExportYAML(container)); node.Add("m_Father", Father.ExportYAML(container)); node.Add("m_RootOrder", GetSiblingIndex()); node.Add("m_LocalEulerAnglesHint", LocalRotation.ToEuler().ExportYAML(container)); return(node); }
protected override YAMLMappingNode ExportYAMLRoot(IExportContainer container) { YAMLMappingNode node = base.ExportYAMLRoot(container); node.Add(LocalRotationName, LocalRotation.ExportYAML(container)); node.Add(LocalPositionName, LocalPosition.ExportYAML(container)); node.Add(LocalScaleName, LocalScale.ExportYAML(container)); node.Add(ChildrenName, Children.ExportYAML(container)); node.Add(FatherName, Father.ExportYAML(container)); node.Add(RootOrderName, GetRootOrder(container.Version, container.Flags)); node.Add(LocalEulerAnglesHintName, GetLocalEulerAnglesHint(container.Version, container.Flags).ExportYAML(container)); return(node); }
protected override YAMLMappingNode ExportYAMLRoot(IExportContainer container) { YAMLMappingNode node = base.ExportYAMLRoot(container); TransformLayout layout = container.Layout.Transform; node.Add(layout.LocalRotationName, LocalRotation.ExportYAML(container)); node.Add(layout.LocalPositionName, LocalPosition.ExportYAML(container)); node.Add(layout.LocalScaleName, LocalScale.ExportYAML(container)); node.Add(layout.ChildrenName, Children.ExportYAML(container)); node.Add(layout.FatherName, Father.ExportYAML(container)); node.Add(layout.RootOrderName, RootOrder); node.Add(layout.LocalEulerAnglesHintName, LocalEulerAnglesHint.ExportYAML(container)); return(node); }
protected override YAMLMappingNode ExportYAMLRoot(IExportContainer container) { PrefabInstanceLayout layout = container.ExportLayout.PrefabInstance; if (layout.IsModificationFormat) { YAMLMappingNode node = ExportYAMLRootObject(container); node.AddSerializedVersion(layout.Version); if (layout.HasRootGameObject && layout.IsRootGameObjectFirst) { node.Add(layout.RootGameObjectName, RootGameObject.ExportYAML(container)); } node.Add(layout.ModificationName, Modification.ExportYAML(container)); node.Add(layout.SourcePrefabInvariantName, SourcePrefab.ExportYAML(container)); if (!layout.IsRootGameObjectFirst) { node.Add(layout.RootGameObjectName, RootGameObject.ExportYAML(container)); } if (layout.HasIsPrefabAssetInvariant) { node.Add(layout.IsPrefabAssetInvariantName, IsPrefabAsset); } if (layout.HasIsExploded) { node.Add(layout.IsExplodedName, IsExploded); } return(node); } else { YAMLMappingNode node = new YAMLMappingNode(); node.Add(layout.LastMergeIdentifierName, LastMergeIdentifier.ExportYAML(container)); if (layout.HasLastTemplateIdentifier) { node.Add(layout.LastTemplateIdentifierName, LastTemplateIdentifier.ExportYAML(container)); } node.Add(layout.ObjectsName, Objects.ExportYAML(container)); node.Add(layout.FatherName, Father.ExportYAML(container)); node.Add(layout.IsDataTemplateName, IsDataTemplate); YAMLMappingNode baseNode = base.ExportYAMLRoot(container); node.Append(baseNode); return(node); } }
protected override YAMLMappingNode ExportYAMLRoot(IExportContainer container) { if (IsModificationsFormat(container.Version)) { YAMLMappingNode node = ExportYAMLRootObject(container); node.AddSerializedVersion(ToSerializedVersion(container.ExportVersion)); bool hasRootGameObject = IsRootGameObjectRelevant(container.ExportFlags); bool isRootGameObjectFirst = IsRootGameObjectFirst(container.ExportVersion); if (hasRootGameObject && isRootGameObjectFirst) { node.Add(RootGameObjectName, RootGameObject.ExportYAML(container)); } node.Add(ModificationName, Modification.ExportYAML(container)); node.Add(GetSourcePrefabName(container.ExportVersion), SourcePrefab.ExportYAML(container)); if (hasRootGameObject && !isRootGameObjectFirst) { node.Add(RootGameObjectName, RootGameObject.ExportYAML(container)); } if (IsPrefabAssetRelevant(container.ExportVersion)) { node.Add(GetIsPrefabAssetName(container.ExportVersion), IsPrefabAsset); } if (IsExplodedRelevant(container.ExportVersion)) { node.Add(IsExplodedName, IsExploded); } return(node); } else { YAMLMappingNode node = new YAMLMappingNode(); node.Add(LastMergeIdentifierName, LastMergeIdentifier.ExportYAML(container)); if (HasLastTemplateIdentifier(container.ExportVersion)) { node.Add(LastTemplateIdentifierName, LastTemplateIdentifier.ExportYAML(container)); } node.Add(ObjectsName, Objects.ExportYAML(container)); node.Add(FatherName, Father.ExportYAML(container)); node.Add(IsDataTemplateName, IsDataTemplate); YAMLMappingNode baseNode = base.ExportYAMLRoot(container); node.Append(baseNode); return(node); } }