void PressInputString(Transform hit) { Mtext_UI_InputString inputString = hit.gameObject.GetComponent <Mtext_UI_InputString>(); if (!InteractWithInputString(inputString)) { return; } inputString.Select(); clickedTarget = hit; }
bool InteractWithInputString(Mtext_UI_InputString inputString) { if (!inputString) { return(false); } if (inputString.interactable) { return(true); } return(false); }
void OnEnable() { myTarget = (Mtext_UI_InputString)target; soTarget = new SerializedObject(target); autoFocusOnGameStart = soTarget.FindProperty("autoFocusOnGameStart"); interactable = soTarget.FindProperty("interactable"); maxCharacter = soTarget.FindProperty("maxCharacter"); typingSymbol = soTarget.FindProperty("typingSymbol"); enterKeyEndsInput = soTarget.FindProperty("enterKeyEndsInput"); text = soTarget.FindProperty("text"); background = soTarget.FindProperty("background"); input = soTarget.FindProperty("input"); placeHolderText = soTarget.FindProperty("placeHolderText"); placeHolderTextMat = soTarget.FindProperty("placeHolderTextMat"); inFocusTextMat = soTarget.FindProperty("inFocusTextMat"); inFocusBackgroundMat = soTarget.FindProperty("inFocusBackgroundMat"); outOfFocusTextMat = soTarget.FindProperty("outOfFocusTextMat"); outOfFocusBackgroundMat = soTarget.FindProperty("outOfFocusBackgroundMat"); disabledTextMat = soTarget.FindProperty("disabledTextMat"); disabledBackgroundMat = soTarget.FindProperty("disabledBackgroundMat"); disabledBackgroundMat = soTarget.FindProperty("disabledBackgroundMat"); typeSound = soTarget.FindProperty("typeSound"); audioSource = soTarget.FindProperty("audioSource"); onInput = soTarget.FindProperty("onInput"); onBackspace = soTarget.FindProperty("onBackspace"); onInputEnd = soTarget.FindProperty("onInputEnd"); showMainSettings = myTarget.showMainSettings; showStyleSettings = myTarget.showStyleSettings; showAudioSettings = myTarget.showAudioSettings; showUnityEventSettings = myTarget.showUnityEventSettings; }