06-28-2021 07:53 AM
Hi, I met a problem when I try to select part of the text in TMP_InputField in VR.
I can select part of the text with Oculus Link, but I cannot select with apk in Quest. In this apk, I can only click the whole TMP_InputField object, but cannot see the caret. And selection will begin from the end of the text.
If anyone knows what the problem is or has suggestions I would appreciate it! Thank you.
06-28-2021 10:17 AM
I think this is because Oculus Quest is an Android platform and TextMeshPro for Unity is expecting that on Android the system keyboard overlay will be displayed when you click on an input field and cursor selection/movement will be handled by that system keyboard.
Do you have the "Requires System Keyboard" checkbox in the OVRCamerRig prefab selected? It might help. Otherwise if you really need the cursor selection functionality you might have to reimplement it yourself (or submit a bug to Unity).
07-06-2021 12:02 AM
Thank you for your reply! I think you are right. the system keyboard make the TextMeshPro is not focused. Even if I cancelled the system keyboard, I cannot highlight (I can select part of text though). My solution to have highlighting is to comment out the "return if not focus" lines of code in the OnFillVBO in the TMP_InputField script.