Esempio n. 1
0
        protected override void OnEnable()
        {
            base.OnEnable();

            TextComponent = (QText)target;
            key           = serializedObject.FindProperty("key");
        }
Esempio n. 2
0
        public static QText AddComponent()
        {
            QText component = UtilityEditor.ExtensionComponentWhenCreate <QText>(typeof(QText).Name.ToString());

            //设置默认值
            SetDefaultValue(component);
            return(component);
        }
Esempio n. 3
0
 private static void SetDefaultValue(QText component)
 {
     if (component == null)
     {
         return;
     }
     component.font               = DefaultFont;
     component.supportRichText    = false;
     component.raycastTarget      = false;
     component.alignment          = TextAnchor.MiddleCenter;
     component.horizontalOverflow = HorizontalWrapMode.Overflow;
     component.color              = Color.black;
     component.fontSize           = 18;
     component.text               = "QText";
 }
Esempio n. 4
0
 public override void GeneratePathEditor()
 {
     //==自动化路径开始
     QText_Title   = CacheTransform.Find("Center/QText_Title/").GetComponent <QText>();
     QButton_Close = CacheTransform.Find("Center/ButtonGroup/QButton_Close/").GetComponent <QButton>();
 }