Addressables.LoadContentCatalogAsync throws null reference error in build
Im trying to load addressable catalog through script and it works fine in Unity Editor but throws null reference exception when run in build. The Unity version I'm using is 2019.4.9f1. Here's my code.
public async Task LoadCatalog(string catalogPath) { LogsUtil.Log(LogsUtil.LOG_PRIORITY.P1, LogsUtil.LOGTYPE.LOG, "[AddressableProfilePath] [LoadCatalog] Addressable profile path is set to " + path); ; if (File.Exists(catalogPath)) { Debug.Log("Loading " + catalogPath); try { AsyncOperationHandle asyncOperation = Addressables.LoadContentCatalogAsync(catalogPath, true); await asyncOperation.Task; Debug.Log("Catalog loaded"); } catch(Exception e) { Debug.LogError("Catalog loading failed -> " + e.Message); } } else Debug.Log(catalogPath + "Doesn't exist"); }
@unity_bill
Answer by ssinga1 · Aug 30, 2021 at 05:23 AM
Facing the same issue and need help in resolving it. Using Unity 2020.3.8 and addressables version 1.16. @davidla_unity @TreyK-47 @unity_bill @DavidUnity3d.
Your answer
Follow this Question
Related Questions
NullReferenceException with UnityEditor.SettingsProvider.Repaint 0 Answers
how to get component of array in unity 0 Answers
"Failed to load window layout" Error 5 Answers
Unity installation error, DISM 87 0 Answers