protected virtual void Start() { var input = gameObject.GetComponent <TMP_InputField>(); NextFrame.Function( delegate { input.onValueChanged.Invoke(input.text); }); }
void Start() { if (InputField.characterValidation.Equals(TMP_InputField.CharacterValidation.None)) { InputField.onValidateInput += MyValidate; } NextFrame.Function(ResizeField2); InputField.onValueChanged.AddListener(ResizeField); }
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); } }
protected virtual void ResizeField2() { if (resizeLock) { return; } resizeLock = true; NextFrame.Function(ActivateResizeTMP); NextFrame.Function(delegate { NextFrame.Function(ActivateResizeTMP); }); if (InputField) { ZeroRectTransformOffsets(InputField.textComponent.rectTransform); } }
protected virtual void Start() { Scrollbar = GetComponent <Scrollbar>(); NextFrame.Function(ResetScroll); }
// Use this for initialization void Start() => NextFrame.Function(Fix);