Skip to content
This repository has been archived by the owner on Dec 12, 2023. It is now read-only.

Plugin conflict #2

Open
Racines opened this issue Jul 8, 2020 · 3 comments
Open

Plugin conflict #2

Racines opened this issue Jul 8, 2020 · 3 comments

Comments

@Racines
Copy link

Racines commented Jul 8, 2020

Hello,
I'm using your plugin in one of my project, it work well except when I try to use it in correlation with another one: WebGLInput

Since the use of IME cause to loose some feature of Text Mesh Pro like mouse selection. In my project I want to be able to copy/paste without the need of IME (for latin language).
So I use both your plugin and WebGLInput.

I made a simple project based on the source code of the other plugin and I added your plugin.
The problem seems to be caused by WebGLCopyAndPaste.jslib at line 56.
Probably in conflict with the code of other plugin: UnityEngine.WebGLInput.captureAllKeyboardInput = true; in WebGLInput.cs at line 235 and 243

The bug cause two problems:

  1. UnityEngine.WebGLInput.captureAllKeyboardInput = true; seems to cause side effect like described here
    To reproduce this in the sample, select the input at top right, deselect it then select it again. Now if you press any key it will be printed twice in the input field. Also each time you unselect and select again the inputfield it will write the key once more when you press it.
  2. It seems that normal character inputs are not catched by the html inputfield but is catched by inputfield in Unity. The IME seems to work properly if not in ASCII mode.

When I comment all the code in WebGLCopyAndPaste.jslib from line 37 to line 60 the problems seems to be solved. Also remplacing only the line 56 from return fn.apply(this, hArgs); to return fn.apply(this, args); solve it too.
Of course I don't understand what this code do exactly so just replacing this line don't seems to be a wise solution!

Do you have an idea on how to fix this properly?

@PlayaPeter
Copy link

I'm having the same problems. We have a HTML overlay in our project which needs to be able to receive input. That's why we have to use UnityEngine.WebGLInput.captureAllKeyboardInput as well but it doesn't work anymore when using this plugin. Only the Unity input field (TextMeshPro) receives the input, not the HTML input. After setting UnityEngine.WebGLInput.captureAllKeyboardInput back to true, the Unity input field will receive all input twice (or even three, four or more times, depending on how often you switch that setting on/off).

@Racines did you find any (proper) solution by now?

@Racines
Copy link
Author

Racines commented Mar 23, 2022

@PlayaPeter Sadly no, If think I chose to disable the use of the other plugin if user don't use IME

@PlayaPeter
Copy link

Too bad. Anyhow, thanks for the quick response! Guess I'll just get rid of the HTML overlays then to avoid the problems.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants