Unity-Technologies / UnityRenderStreaming

Streaming server for Unity
Other
1.3k stars 358 forks source link

[BUG]: EmulateInputField.cs produces a fallback character if you press CapsLock, Shift, or Backspace #1007

Open SamJTeleqo opened 4 weeks ago

SamJTeleqo commented 4 weeks ago

Package version

3.1.0-exp.7

Environment

* OS: Windows 11
* Unity version: 2022.3.19f1
* Graphics API: URP
* Browser: Microsoft Edge

Steps To Reproduce

  1. Add the #if URS_USE_TEXTMESHPRO to your project to make TMPro input fields function while render streaming (as mentioned in bug https://github.com/Unity-Technologies/UnityRenderStreaming/issues/1006)
  2. Render Stream into unity and select a TMPro Input Field
  3. Press Caps Lock, Backspace, or Shift and an empty square will appear in the input field

Current Behavior

Pressing these three keys will make the fallback char (empty square character) appear in the Text Mesh Pro input field. The keys function as they should, but they also add the fallback char to the field.

I notice a PR was actually pushed to fix this in https://github.com/Unity-Technologies/UnityRenderStreaming/pull/945, but that code did not make it into 3.1.0exp.7. If I add that PR's added if statement to the script myself, the problem goes away.

Expected Behavior

CapsLock, Shift, and Backspace shouldn't add characters to input fields.

Anything else?

No response