void TraverseDependPackage(ResourceComponent component, ResourceComponent root) { foreach (ComponentNode node in component.componentList) { if (node.resourceComponent != null) { root.AddDependPackage(node.resourceComponent.package); TraverseDependPackage(node.resourceComponent, root); } } }