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

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

            DontDestroyOnLoad(gameObject);
            Instance = this;
        }
コード例 #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);
     }
 }
コード例 #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);
            }
        }
コード例 #6
0
 protected virtual void Start()
 {
     Scrollbar = GetComponent <Scrollbar>();
     NextFrame.Function(ResetScroll);
 }
コード例 #7
0
 // Use this for initialization
 void Start() => NextFrame.Function(Fix);