Unity-Technologies / UnityRenderStreaming

Streaming server for Unity
Other
1.31k stars 365 forks source link

[BUG]: #if URS_USE_TEXTMESHPRO define directive stops EmulateInputField.cs from working with TMPro Input Fields #1006

Open SamJTeleqo opened 2 months ago

SamJTeleqo commented 2 months 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. Render Stream into the project
  2. Select a Text Mesh Pro input field
  3. Attempt keyboard input and it doesn't work
  4. Manually add the define directive to the project or remove it from the code and it will work

Current Behavior

All TMPro functionality in EmulateInputField.cs is wrapped in the define directive #if URS_USE_TEXTMESHPRO, preventing it from functioning.

I don't know the intention of this directive. I imagine it's supposed to check and be true if your project contains the TMPro package, but that is not the case. If the intention is just to add it to manually add it to the project if you use the TMPro package, that is very confusing, as I wasn't aware that this script existed at all, let alone that it needed a special define directive.

Expected Behavior

I expected TMPro input fields to work by default while Render Streaming, not need me to manually add a specific define directive.

Anything else?

No response