Beispiel #1
0
 public void Add(GameObject gameObject, GroupDelegator item)
 {
     if (item.Update == GroupDelegator.DefaultAction)
     {
         var obj = gameObject.AddComponent <GroupToggleBehaviour>();
         obj.groupItem = item;
         Add(obj);
         obj.hideFlags = HideFlags.HideInInspector;
     }
     else
     {
         var obj = gameObject.AddComponent <GroupBehaviour>();
         obj.groupItem = item;
         Add(obj);
         obj.hideFlags = HideFlags.HideInInspector;
     }
 }
Beispiel #2
0
 public void Add(Component component, GroupDelegator item)
 {
     Add(component.gameObject, item);
 }