My environment is the following : Unity v2017.3.1f1, Oculus Utilities v1.27.0, OVRPlugin v1.27.0, SDK v1.29.0, Oculus Go
I've set up the Platform SDK. The Entitlement and the AsyncInitialize is working fine on the Editor with the OculusPlatformSettings configured with my Oculus account, but when I'm calling AssetFile.GetList().OnComplete(MyFunction), I'm never getting a callback to my "MyFunction" method.
If I push it to my alpha channel, it seems to reach it properly, but then I have another issue : it doesn't find any asset file despite the fact that I can see them on the build details.
I'm not sure what I'm doing wrong here ? Commands like Users.GetLoggedInUser() are working fine on the editor, but anything related to the AssetFiles doesn't seems to trigger any event on the editor.
- On the Oculus Go, If I launch the app for the first time after an update or the first instalation, AssetFile.GetList() return an empty array
- If I launch the app at least a second time after an installation or an update, it does return all my Assets.
That's really weird.
Edit 2 : Additional information : I've tried upgrading to Unity 2017.4.9, still the exact same behavior.
Edit 3 :
I'm still experiencing both issues :
- Unable to get the AssetFiles on the Editor (callback method never called)
- Unable to get AssetFile on first launch after an install or an update
I'm trying to go deeper in the process, here's what's working when I'm able to get the assetfiles :
- I can loop my AssetFile list and get the one I want
- I can download it, after it's downloaded, it's put on the following folder according to AssetFileDownloadResult : /storage/emulated/0/Android/obb/fr.InsideLearning.AQUIOThermes/myFile
- I'm able to retrieve it using "UnityEngine.Networking.UnityWebRequest.GetAssetBundle" with the URI : "file:///storage/emulated/0/Android/obb/fr.InsideLearning.AQUIOThermes/myFile", I'm also downloading the .meta and .manifest file.
However, when I'm trying to get the AssetBundle using DownloadHandlerAssetBundle.GetContent(), I'm getting the following error :
"Failed to open file 'archive:/CAB-5aadb2fd12ba293da215f3179655470e/CAB-5aadb2fd12ba293da215f3179655470e.resource'. (No such file or directory)".
Am I doing something wrong ? Is this the right way to read AssetBundle files generated using Unity and set as "DLC" on Oculus ? It's kind of driving me crazy, this is a critical piece of the app I'm creating for a customer.
For information, I've set permissions to READ and WRITE to external storage.
I really, really need your help,
PS : Maybe that's related, but you say on the documentation that users can manually download DLC file outside the app, but I can't find a way to do it when I'm on the app main page on the Oculus go, or from my smartphone
- The GetContent() error I was having was due to an Unity bug so I stopped usind BundleAssets. So on the Oculus Go everything's working fine now.
I still have two issues remaining :
- Unable to get the AssetFiles on the Editor (callback method never called), maybe it is by design ?
- Unable to get AssetFile on first launch after an install or an update. This is kind of random. I have some code that just output the number of Asset I'm getting from Oculus. Sometime it says 0 assets, sometimes it find every assets. When it find zero assets, there's no error. it just return 0 file in the List.
I'm doing every check I can to make sure the AssetFile.GetList() method can run properly, i.e checking if Core has been initialised before getting the assets.
I've upgraded my project to Unity 2018.1, no change. To make sure it wasn't some kind of "I started the method too soon" issue, I modified my code to start again getting the Asset from Oculus in case it was returning no assets. It didn't worked and keep looping trying to get the assets.
@imperativity Sadly it seems that the issue where GetList() randomly doesnt return any assets it a known issue, no fix ETA for now :(. This make it impossible to use the DLC system into a released build, that's really a shame as it was really handy and time saving.
Hi @imperativity, we started some initial deployment of the app this week, and the issue seems worse. I had to update the app to add a popup that ask the user to restart the app everytime AssetFile.GetList() returns an empty array, but sometimes even restarting the app doesn't work. Do you have an ETA for the fix ?