public YAMLNode ExportYAML(IExportContainer container) { ComponentPairLayout layout = container.Layout.GameObject.ComponentPair; YAMLMappingNode node = new YAMLMappingNode(); node.Add(layout.ComponentName, Component.ExportYAML(container)); return(node); }
public GameObjectLayout(LayoutInfo info) { ComponentPair = new ComponentPairLayout(info); if (info.Version.IsGreaterEqual(5, 5)) { // unknown Version = 5; } else if (info.Version.IsGreaterEqual(4)) { // active state inheritance Version = 4; } else { // min is 3 // tag is ushort for Release, otherwise string. For later versions for yaml only string left Version = 3; // tag is string // Version = 2; // tag is ushort // Version = 1; } if (info.Flags.IsRelease() || info.Version.IsLess(2, 1)) { HasTag = true; } if (info.Version.IsGreaterEqual(2, 1) && !info.Flags.IsRelease()) { HasTagString = true; } if (info.Version.IsGreaterEqual(3, 5) && !info.Flags.IsRelease()) { HasNavMeshLayer = true; HasStaticEditorFlags = true; } if (info.Version.IsGreaterEqual(3) && info.Version.IsLess(3, 5) && !info.Flags.IsRelease()) { HasIsStatic = true; } if (info.Version.IsGreaterEqual(3, 4) && !info.Flags.IsRelease()) { HasIcon = true; } if (info.Version.IsLess(5, 5)) { IsComponentTuple = true; } if (info.Version.IsLess(2, 1)) { IsActiveFirst = true; } if (info.Version.IsGreaterEqual(2, 1)) { IsNameFirst = true; } if (info.Version.IsGreaterEqual(3, 5)) { IsIconFirst = true; } if (info.Version.IsLess(4)) { IsActiveInherited = true; } }
public IEnumerable <PPtr <Object> > FetchDependencies(DependencyContext context) { ComponentPairLayout layout = context.Layout.GameObject.ComponentPair; yield return(context.FetchDependency(Component, layout.ComponentName)); }