Hi,
I'm implementing DLCs on my project. I've uploaded a build with an extention file that I can see on the Oculus Dashboard and it's there on the Alpha channel. Everything went smooth.
From the application though if I call "AssetFile.GetAssetDetailsList()" it doesn't return any DLCs. I've attached my full code.
void OculusDLC()
{
try
{
Core.AsyncInitialize().OnComplete(OnOculusComplete);
}
catch
{
Debug.Log("ERRORE");
}
}
void OnOculusComplete(Message message)
{
AssetFile.GetList().OnComplete(OnGetAssetComplete);
}
void OnGetAssetComplete(Message msg)
{
if (msg.IsError)
{
Debug.LogError("Error fetching DLC List: " + msg.GetError().Message);
}
else
{
var assetList = msg.GetAssetDetailsList();
foreach (var item in assetList)
{
Debug.Log("AssetID: " + item.AssetId);
Debug.Log("AssetType: " + item.AssetType);
Debug.Log("DownloadStatus: " + item.DownloadStatus);
Debug.Log("Filepath: " + item.Filepath);
if (item.DownloadStatus == "installed")
ReadDLC(item.Filepath);
//Download it
else if (string.Equals(item.DownloadStatus, "available"))
{
AssetFile.DownloadById(item.AssetId).OnComplete((msg1) =>
{
if (msg1.IsError)
{
Debug.Log("Error downloading assetID: " + item.AssetId + " " + msg1.GetError().Message);
}
else
{
Debug.Log("Downloaded intiated at: " + msg1.GetAssetFileDownloadResult().Filepath);
ReadDLC(msg1.GetAssetFileDownloadResult().Filepath);
var r = msg1.GetAssetFileDownloadUpdate();
}
});
}
else
{
Debug.Log("--------------------------------Asset ID: " + item.AssetId + " Status: " + item.DownloadStatus);
}
}
}
}
ReadDLC is our own internal function.