Exemple #1
0
        protected virtual void Start()
        {
            var input = gameObject.GetComponent <TMP_InputField>();

            NextFrame.Function(
                delegate { input.onValueChanged.Invoke(input.text); });
        }
Exemple #2
0
 void Start()
 {
     if (InputField.characterValidation.Equals(TMP_InputField.CharacterValidation.None))
     {
         InputField.onValidateInput += MyValidate;
     }
     NextFrame.Function(ResizeField2);
     InputField.onValueChanged.AddListener(ResizeField);
 }
Exemple #3
0
        void Awake()
        {
            if (Instance != null)
            {
                Destroy(gameObject);
                return;
            }

            DontDestroyOnLoad(gameObject);
            Instance = this;
        }
Exemple #4
0
 protected override void Start()
 {
     base.Start();
     if (canvas == null)
     {
         canvas = GetComponentInParent <Canvas>();
         UpdateSize();
         // this is messy but the reference pixels needs to be a big enough change for this to actually update properly
         canvas.referencePixelsPerUnit -= .01f;
         NextFrame.Function(UpdateSize);
     }
 }
Exemple #5
0
        protected virtual void ResizeField2()
        {
            if (resizeLock)
            {
                return;
            }
            resizeLock = true;

            NextFrame.Function(ActivateResizeTMP);
            NextFrame.Function(delegate { NextFrame.Function(ActivateResizeTMP); });

            if (InputField)
            {
                ZeroRectTransformOffsets(InputField.textComponent.rectTransform);
            }
        }
Exemple #6
0
 protected virtual void Start()
 {
     Scrollbar = GetComponent <Scrollbar>();
     NextFrame.Function(ResetScroll);
 }
Exemple #7
0
 // Use this for initialization
 void Start() => NextFrame.Function(Fix);