Ejemplo n.º 1
0
    public void UpdateEditor()
    {
        if (editorID < 0)
        {
            return;
        }

        WebGLAce.SetEditorReadOnly(editorID, !this.interactable);
        WebGLAce.SetEditorFocused(editorID, this.interactable && this.enabled);
#if UNITY_WEBGL && !UNITY_EDITOR
        WebGLInput.captureAllKeyboardInput = !(this.interactable && this.enabled);
#endif
        Debug.Log("WebGLAce_TMP_InputField: UpdateEditor: readOnly " + (!this.interactable) + " focused: " + (this.interactable && this.enabled) + " capture: " + !(this.interactable && this.enabled));
    }
Ejemplo n.º 2
0
    public void HideEditor()
    {
        if (editorID < 0)
        {
            return;
        }

        if (this.interactable)
        {
            string text = WebGLAce.GetEditorText(editorID);
#if UNITY_WEBGL && !UNITY_EDITOR
            Debug.Log("WebGLAce_TMP_InputField: HideEditor: text: " + text);
            this.text = text;
#endif
        }

        WebGLAce.SetEditorVisible(editorID, false);
        WebGLAce.SetEditorFocused(editorID, false);
#if UNITY_WEBGL && !UNITY_EDITOR
        WebGLInput.captureAllKeyboardInput = true;
#endif
    }