public static QRawImage AddComponent() { QRawImage component = UtilityEditor.ExtensionComponentWhenCreate <QRawImage>(typeof(QRawImage).Name.ToString()); //设置默认值 SetDefaultValue(component); return(component); }
public static QText AddComponent() { QText component = UtilityEditor.ExtensionComponentWhenCreate <QText>(typeof(QText).Name.ToString()); //设置默认值 SetDefaultValue(component); return(component); }
public static QButton AddComponent() { QImageBox image = UtilityEditor.ExtensionComponentWhenCreate <QImageBox>(typeof(QButton).Name.ToString()); QButton component = Utility.GetOrAddCompoment <QButton>(image.gameObject); //设置默认值 SetDefaultValue(component); return(component); }
public static QToggleButtonGroup AddComponent() { QToggleButtonGroup component = UtilityEditor.ExtensionComponentWhenCreate <QToggleButtonGroup>(typeof(QToggleButtonGroup).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); }