Error when using VisionosVideoComponent for AVP

I am trying to build a visionOs app with unity, I just put a 3d model with empty gameobject that have the VisionosVideoComponent and when I run the app the video works well, but when I build it on the simulator, it give in line 318 runtime error.
318 -> 0x104b6d904 <+1264>: brk #0x1 Thread 1: Swift runtime failure: Unexpectedly found nil while unwrapping an Optional value

Hi there, have you followed the VisionOSVideoComponent documentation surrounding where to copy your video clip to? Specifically,

A limitation of the current system is that the clip must be manually copied into a ../StreamingAssets/VisionOSVideoClips/ folder to display and render properly on visionOS. This folder must be relative from the project folder - for example, the full folder path may be Assets/StreamingAssets/VisionOSVideoClips/. Create this folder if it does not exist. Ensure that the clip is not just moved into this folder, but copied into it, so that there are two instances of it - one referenced by the VisionOSVideoComponent and one under the StreamingAssets folder.

Please let me know if that fixes it. Thanks!

Yes I did it as the documntation, and I made sure to copy not to move

Thanks for confirming, sorry you’re still having issues. Would you be able to submit a bug report and share the ticket ID here?

I found a soultion, I used videoplayer with sphere in VR app mode, and it doesnt work in MR mode, so is there a way to switch between them?

Hi,

The normal Unity VideoPlayer works in both VR app mode and MR, but in MR, you will have to set the VideoPlayer to write to a RenderTexture, and then apply that RenderTexture to the object of your choice.

Afterwards, you’ll have to call PolySpatialObjectUtils.MarkDirty() on the RenderTexture once per frame.

You can find more details in the Video Player components documentation.