コード例 #1
0
        public YAMLNode ExportYAML(IExportContainer container)
        {
            YAMLMappingNode          node   = new YAMLMappingNode();
            PrefabModificationLayout layout = container.Layout.PrefabInstance.PrefabModification;

            node.Add(layout.TransformParentName, TransformParent.ExportYAML(container));
            node.Add(layout.ModificationsName, Modifications.ExportYAML(container));
            node.Add(layout.RemovedComponentsName, RemovedComponents.ExportYAML(container));
            return(node);
        }
コード例 #2
0
        public IEnumerable <PPtr <Object> > FetchDependencies(DependencyContext context)
        {
            PrefabModificationLayout layout = context.Layout.PrefabInstance.PrefabModification;

            yield return(context.FetchDependency(TransformParent, layout.TransformParentName));

            foreach (PPtr <Object> asset in context.FetchDependencies(Modifications, layout.ModificationsName))
            {
                yield return(asset);
            }
            foreach (PPtr <Object> asset in context.FetchDependencies(RemovedComponents, layout.RemovedComponentsName))
            {
                yield return(asset);
            }
        }