I’m using vuforia to make an application with augmented reality. I need to make a cloud recognition an download a video according to the detected marker.
The problems:
I can’t include a video file into a bundleasset so I put it apart and tried to downloaded with the www class method
I downloaded the video but I can’t put it in the stremingasset directory. This is the code I have now to download the video an put it in the correct place
UnauthorizedAccessException: Access to the path “/var/mobile/Applications/XXXX-XXXXX-XXX/Test.app/Data/Raw/video.ogg” is denied.
at System.IO.FileStream…ctor
prioshi - I’m in exactly the same place, including making the same mistake of using LoadFromCacheOrDownload at first before realizing this was strictly for asset bundles. Then I realized that the StreamingAssets directory is always read only (at least on iOS, I think on all platforms).
If I have everything correct, then the only solution is to get the Vuforia video plug-in to accept videos stored at Application.persistentDataPath - which I don’t think it currently does. I’ve posted about it on the Vuforia forums, but I’m pessimistic. Let me know if you’ve made more progress than I have. Thanks.
Aha, there’s an answer on the Vuforia forum, you can edit where the Videoplayback plug-in looks for the video files by hacking VideoPlayerHelper.cs: Getting Started | Vuforia Library
I changed the path of the file and I also put the file in Application.persistentDataPath now I can hear the audio but I don’t see any video. I think I’m geting closer but I don’t know what else can I do.