public static UIText CreateComponent() { UIText component = UtilEditor.ExtensionComponentWhenCreate <UIText>(typeof(UIText).Name.ToString()); //设置默认值 SetDefaultValue(component); return(component); }
public static UIRawImage AddComponent() { UIRawImage component = UtilEditor.ExtensionComponentWhenCreate <UIRawImage>(typeof(UIRawImage).Name.ToString()); //设置默认值 SetDefaultValue(component); return(component); }
public static UIButton AddComponent() { UIButton component = UtilEditor.ExtensionComponentWhenCreate <UIButton>(typeof(UIButton).Name.ToString()); UIImage image = UtilEditor.GetOrAddCompoment <UIImage>(component.gameObject); component.targetGraphic = image; //设置默认值 SetDefaultValue(component); return(component); }
public static UITagButtonGroup AddComponent() { UITagButtonGroup component = UtilEditor.ExtensionComponentWhenCreate <UITagButtonGroup>(typeof(UITagButtonGroup).Name.ToString()); // component.list.Clear(); // // for (int i = 0; i < 2; i++) // { // Selection.activeObject = component; // QToggleButton button = QToggleButtonEditor.AddComponent(); // component.list.Add(button); // } // Selection.activeObject = component; return(component); }
public static new UITagButton AddComponent() { // QImageBox image = QImageBoxEditor.AddComponent(); // image.raycastTarget = true; // // QToggleButton component = Util.GetOrAddCompoment<QToggleButton>(image.CacheGameObject); // component.name = typeof(QToggleButton).Name.ToString(); //设置默认值 UITagButton component = UtilEditor.ExtensionComponentWhenCreate <UITagButton>(typeof(UITagButton).Name.ToString()); UIImage image = UtilEditor.GetOrAddCompoment <UIImage>(component.gameObject); component.targetGraphic = image; SetDefaultValue(component); return(component); }