oculus-samples / Unity-StarterSamples

This repository brings multiple samples that can help you explore features and bring them into your project.
Other
127 stars 37 forks source link

TextMeshPro not rendering with OVROverlayCanvas on Quest 3 #20

Open angecroft opened 1 month ago

angecroft commented 1 month ago

Description:

I've tried to use OVROverlayCanvas in a Unity project with TextMeshPro, but the text elements that utilize this script aren't rendered on the Quest 3. This issue can be reproduced using the OVROverlayCanvas_Text sample scene.

Steps to Reproduce:

Environment:

Device: Meta Quest 3 v67 & v68 Unity Version: 2022.3.36f1 Meta XR Core SDK: v67 TextMeshPro Version: 3.0.6 Building on: macOS 14.5 | M1 Pro, Intel

https://github.com/user-attachments/assets/f778e93d-0ff5-4dae-adc7-67961be44494

AlexThiv commented 1 month ago

@angecroft Thanks for rising this issue. There was a change on how the OVROverlayCanvas shader is setup and it was missed in this release. To fix the issue you can open the OVROverlayCanvas_Text scene. A new setting file will be created OVROverlayCanvasSettings image

Then to have the settings value set to default you will need to click on a GameObject with the OVR Overlay Canvas script. Here is an example from that scene image

Finally the settings will have the default value image

Now you can rebuild and test. Sorry for the inconvenience we will fix it in an upcoming release.

angecroft commented 3 weeks ago

Thank you for your advice; it worked. However, when I build only the OVROverlayCanvas_Text scene without including any other scenes (so it starts directly with this one), I still can't see any of the OVROverlayCanvas. I tested this to closely replicate the setup of my project, where I still can't see any text using OVROverlayCanvas.

Is there anything in the StartScene, like settings or something else, that could interfere with the OVROverlayCanvas_Text scene?

Thank you for your help @AlexThiv

angecroft commented 2 weeks ago

Hi @AlexThiv

Apologies for the follow-up, but I wanted to check if you had a chance to look into launching the OVROverlayCanvas_Text independently, without using the SceneManager.

Thanks for your time!

AlexThiv commented 2 weeks ago

Hi @angecroft,

Yes we just looked into it, it seems to be a timing issue where the canvas gets the wrong scaling in the first frame. We have a fix coming up in a future update.

As a momentary fix you can have the OVROverlayCanvas disabled on the first frame of the application and enable them on a later frame, or have a startup scene that would load the scene with the OVROverlayCanvas.

AlexThiv commented 2 weeks ago

Our latest v68 release contains the initial fix suggested previously.