Skip to content

Instantly share code, notes, and snippets.

@kastnerp
Created July 6, 2019 13:01
Show Gist options
  • Save kastnerp/c5f079b2f396dd7d7e91a00528d00a58 to your computer and use it in GitHub Desktop.
Save kastnerp/c5f079b2f396dd7d7e91a00528d00a58 to your computer and use it in GitHub Desktop.
DataTree to List of Lists (works only in scripting component)
public static List<List<T>> ToListOfLists<T>(DataTree<T> tree)
{
List<List<T>> list = new List<List<T>>();
foreach (List<T> b in tree.Branches)
{
list.Add(b);
}
return list;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment