예제 #1
0
        public static QRawImage AddComponent()
        {
            QRawImage component = UtilityEditor.ExtensionComponentWhenCreate <QRawImage>(typeof(QRawImage).Name.ToString());

            //设置默认值
            SetDefaultValue(component);
            return(component);
        }
예제 #2
0
        public static QText AddComponent()
        {
            QText component = UtilityEditor.ExtensionComponentWhenCreate <QText>(typeof(QText).Name.ToString());

            //设置默认值
            SetDefaultValue(component);
            return(component);
        }
예제 #3
0
        public static QButton AddComponent()
        {
            QImageBox image     = UtilityEditor.ExtensionComponentWhenCreate <QImageBox>(typeof(QButton).Name.ToString());
            QButton   component = Utility.GetOrAddCompoment <QButton>(image.gameObject);

            //设置默认值
            SetDefaultValue(component);
            return(component);
        }
예제 #4
0
        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);
        }