Trees- Branch(Leaf) Group Scripting

I was wondering if there is any way to manipulate the Branch(or Leaf) Group Properties of a Tree object by scripting! I cannot find any script reference for this either any relevant post! What I need to do is simply change a Branch Group’s frequency at run time. Could any one help?

Did you ever figure this out? I wouldn’t mind a point in the right direction XD

foreach (Tree tree in _tree)
{

var k = tree.data as TreeData;
k.root.adaptiveLODQuality = 1;
k.root.enableAmbientOcclusion = true;
foreach (var leaf in k.leafGroups)
{
leaf.distributionFrequency = 50;
leaf.UpdateMesh(\unknown properties//);
}
k.UpdateMesh(tree.transform.worldToLocalMatrix, out material);
}