Beispiel #1
0
 private void SetValues(AddComponentMenuItem set, ref Dictionary <string, Texture> groupsDictionary, ref List <AddComponentMenuItemConfig> itemsList)
 {
     if (set.IsGroup)
     {
         groupsDictionary[set.FullLabel()] = set.Preview;
         for (int n = 0, count = set.children.Length; n < count; n++)
         {
             SetValues(set.children[n], ref groupsDictionary, ref itemsList);
         }
     }
     else
     {
         itemsList.Add(new AddComponentMenuItemConfig(set.FullLabel(), set.type));
     }
 }
 public string FullLabel()
 {
     if (parent != null)
     {
         return(string.Concat(parent.FullLabel(), "/", label));
     }
     return(label);
 }