I have the following code and it works on Desktop but does not on Android. The logcat doesnt even get to show the FINGERS CROSSED log message. I tried to change the Play Mode Script option to "Use existing build (Android)" as well as "Use Asset Database". Nothing works. No any error messages. The callback never gets to run. What to do???
Update: actually I noticed that now it does not work in editor either. I think I am missing the method invokation...
var address = "stored_jab";
Addressables.LoadResourceLocationsAsync(address).Completed += checkAddressHandle =>
{
//If the list is greater than zero, the address is good.
Debug.Log("__FINGERS CROSSED__");
if (checkAddressHandle.Result.Count > 0)
{
Debug.Log("__SO FAR SO GOOD__");
//make a call to load the actual asset
Addressables.LoadAssetAsync<TextAsset>(address).Completed += handle =>
{
var filestring = handle.Result.text;
var bytesFromBase64 = System.Convert.FromBase64String(filestring);
BinaryFormatter formatter = new();
MemoryStream ms = new MemoryStream(bytesFromBase64);
samples = formatter.Deserialize(ms) as Dictionary<string, StoredPoseSample>;
ms.Close();
ExtractClassNamesAndValues();
isInit = true;
Debug.Log("__WOOHOOO!__");
};
}
else //The address is bad
{
Debug.Log("__WHOOPS__");
}
//The handle must be manually released once you are done
Addressables.Release(checkAddressHandle);
};