Quantcast
Channel: Questions in topic: "assetbundle"
Viewing all articles
Browse latest Browse all 1593

Cannot get Addressables to work after successfully build onto Android?

$
0
0
I am building a basic UI-based application aimed for mobile which loads all assets using Addressable Assets (I have switched over from using the resources folder which worked fine but was too slow after the build - hence the switch). However, when I go to build on to Android (or Windows build), it appears everything is fine ("Build is successful with no error messages), except the addressable assets do NOT work/load - it comes up with a null reference error for the key (ie asset) when I try to load the asset at this point. Therefore the assets dont appear to be building correctly. Snippet of the code I am using that works before I build (hence I think the issue is with the build settings I have and not the code per se). Addressables.LoadAssetAsync("Arrow").Completed += obj => { if (obj.Status == AsyncOperationStatus.Succeeded) { arrow = obj.Result; } else { Debug.Log($"Load Unsuccessful - check the key"); } }; I have read all the documentation and googled (and resorted to building multiple times under different build settings to test). I feel like I am missing one basic step. Any help with be GREATLY appreciated!! PS: The default setttings I use are * The asset is in the addressables folder, marked as an addressable and the address is named correctly. * PlayMode Script (Use Asset DataBase) * I go toBuild > New Build > Build Default script. * The default bundle AssetGroupSchema build path and load path are both set to LocalBuildPath. Note: *I am using Unity 2021.1.0b2 Beta (tho I have tried on 2020.1.17f1c1. *I have built a new basic project that just makes a gameobject appear - which again works perfect when I test in playmode, but does not work in the build (builds successfuly but asset doesnt load).

Viewing all articles
Browse latest Browse all 1593

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>