I'm building a media player for Mixed Reality, so I need to do it with UWP (Editorial Comment: I HATE UWP...)

I built the application using the Unity editor and it works flawlessly. I'm able to access files, play videos, audios, etc.

but….

As soon as I build the project and then compile it with Visual Studio. The file picker I've built works fine since I specified "BroadFileSystemAccess" in the capabilities. However, whenever I use one of the files I picked and use Videoplayer.Url I get Access Denied. This works fine from within Unity, but everything being so sandboxed in UWP, the compiled version does not work.

I've tried adding BroadFileSystemAccess to the generated solution's manifest before compiling. I've tried changing the file access permissions in the "Settings/Privacy/FileSystem" of Windows, allowing my application to access the filesystem.

I checked the Unity Player.Log to ensure this was the problem, and indeed it is…..

This is an example of code that generates that "Access Denied"

public VideoPlayer vp;

public void seturl(string filetoplay)
{
        vp.url = "file://"+filetoplay;
        vp.play();

}

Nothing fancy…. it just crashes…

Any help appreciated!

1 Answers

0
Community On

BroadFileSystemAccess isn't available on MRP, Windows devices or Store applications. This capability is just for desktop development purposes only.

For any distributed appx you should use another ones.