Failed to upload NativeTexture on 1.2.3

Hi, today I updated visionOS XR plugin and PolySpatial packages from 1.1.6 to the 1.2.3. I also migrated from Unity 2022.3.21 to 2022.3.27. Now I have a problem with render texture on my scene. It doesn’t work in Unity editor, but it works on device, simulator and on simulator via Play to Device app. In console I have this error: [Platform] Failed to upload NativeTexture AvatarRenderTexture. Re-uploading via fallback. On 1.1.6 I added the script I found here PolySpatial Render Texture Support | PolySpatial visionOS | 1.2.3 to force rendering on the camera and it worked.

1 Like

I can confirm this problem exists

1 Like

If it’s possible to submit a repro case for this, submit it as a bug report, and let us know the incident number (IN-#####), that would help us debug. The “Failed to upload” warning typically implies an unsupported format, but I’m not sure why it would be supported on device/simulator/Play to Device but not in the editor.

Hi @kapolka Here is the bug report: IN-75824.

Thanks! We’ll take a look soon.

1 Like

Thanks again for the bug report. I see the issue, and it’s happening on our samples as well. As you may know, when we run using PolySpatial in editor play mode, we create a synchronized copy of all the entities in the scene (under DontDestroyOnLoad/PolySpatialRoot:…). That includes the cameras in the scene (in your case, both the main camera and the camera used for the RenderTexture), and we set those cameras’ priorities to 1000 so that they render on top of the other cameras (so that you see the view from the synchronized copy of the camera, with a blue background). However, we don’t currently distinguish between cameras that target the frame buffer and those that target render textures. We will work on a fix for that (so that we don’t synchronize cameras that render to RenderTextures); in the meantime; the best workaround is probably to use the Ignored Objects Layer Mask setting to ignore the GameObject containing the Camera.

1 Like

@kapolka Thank you for detailed description. Could you please tell if the fix will be included in new PolySpatial version or new Unity version?

It will be in a new PolySpatial version, but I don’t have an exact timeline of when it will be released.