UnityPlugin-AVProVideo icon indicating copy to clipboard operation
UnityPlugin-AVProVideo copied to clipboard

Video was not displayed in Vision Pro when using Polyspatial

Open from2001 opened this issue 1 year ago • 9 comments

Describe the issue Video was not displayed in my Vision Pro. It worked in my Unity editor, but it didn't work with the actual device.

Your Setup (please complete the following information): Unity 2022.3.19f1 Poly Spatial 1.1.6 visionOS 1.1.1 UnBounded Scene (Mixed reality mode) AVPro Video v3 - Ultra Edition: Version 3.0.0

To Reproduce

  1. Prepared a Quad as a video screen with ApplyToMesh or ApplyToMaterial (Both didn't work)
  2. Used Universal Render Pipline/Unlit shader and _BaseMap as Texture Property.
  3. Place the Video screen quad into Unity Poly Spatial mixed reality sample scene.

Screenshots

Screenshot 2024-03-27 at 23 30 08 Screenshot 2024-03-27 at 23 32 51

from2001 avatar Mar 27 '24 14:03 from2001

Found for now a workaround, which might have some issues but it's a start i guess.

I'm using a RenderTexture I created in Assets. I use AVPro's Media Player and the ResolveToRendertexture script from AVPro (instead of applytomesh or material). And a little script using Polyspatial which I think allow Polyspatial to find and convert the Render texture and make it compatible with visionOS. Just place the script on a gameobject and drag and drop the render texture.

I think (and then again, sorry if it's fuzzy i'm no expert) ApplytoMesh and ApplytoMaterial don't work because both script create rendertexture during runtime and Polyspatial has no idea where to find them and make them compatible with visionOS.

  using UnityEngine;
  using Unity.PolySpatial;
  
  public class SetRenderTextureDirty : MonoBehaviour
  {
      public RenderTexture texture;
  
      void Update()
      {
          Unity.PolySpatial.PolySpatialObjectUtils.MarkDirty(texture);
      }
  }

ymPoirier avatar Mar 27 '24 15:03 ymPoirier

Thank you. The workaround worked. I hope Unity will fix the problem or AVPro team will fix the problem soon.

from2001 avatar Mar 27 '24 15:03 from2001

Does this only work with Ultra edition AVPro or I can use this with free trial version for Apple Vision Pro? Currently with free trial version, I am getting white display with no rendering but I can hear the audio.

manojahujaTess avatar Aug 21 '24 06:08 manojahujaTess

The trial version does support VisionOS. We don't support polyspatial mode at this time, however windowed and full VR work fine. You could try the above workaround if you are using Polyspatial.

Chris-RH avatar Aug 21 '24 10:08 Chris-RH

@Chris-RH I am still not able to make it work using the workaround. I am getting white display when I have selected Y Cb Cr 420_OES Texture format and Pink (Missing) texture when I have selected BGRA Texture format. I can hear the audio though. Any help is much appreciated. Thanks

manojahujaTess avatar Aug 21 '24 10:08 manojahujaTess

@manojahujaTess Can you open a new issue for this please and fill in all the details.

Chris-RH avatar Aug 21 '24 12:08 Chris-RH

@Chris-RH Created #1974

manojahujaTess avatar Aug 21 '24 12:08 manojahujaTess

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Apr 26 '25 01:04 stale[bot]

Thx, I ve also encountered this problem.

eqgis avatar May 14 '25 07:05 eqgis