Hello
Enterprise customer here (rather an urgent matter) and we are having an issue with the Addressables 2.3.16 on Unity 6-2-Alpha, WebGl. We tried earlier releases and results are the same.
Per Karl Jones earlier recommendations we did clean builds of all kinds. Result reaming the same. It could be a bad piece of code at my end after all.
The below class issues a null reference around the line:
AsyncOperationHandle<GameObject> handle =
Addressables.LoadAssetAsync<GameObject>(location);
- Error pasted at the every end
- a.out file post build from the usual webgl build directory attached
IEnumerator loadexternal0()
{
IEnumerable keys = new List() { “marie1”, “car_piston”};
//https://docs.unity3d.com/Packages/com.unity.addressables@2.3/manual/load-assets-location.html
//turns the strings to locations
AsyncOperationHandle<IList<IResourceLocation>> locations = Addressables.LoadResourceLocationsAsync(keys,
Addressables.MergeMode.Union, typeof(GameObject));
yield return locations;
var loadOps = new List<AsyncOperationHandle>(locations.Result.Count);
Debug.Log("locations.Result= "+ locations.Result.Count);
foreach (IResourceLocation location in locations.Result)
{
Debug.Log(location.PrimaryKey);
AsyncOperationHandle<GameObject> handle =
Addressables.LoadAssetAsync<GameObject>(location);
yield return handle;
handle.Completed += obj => operationDictionary.Add(location.PrimaryKey, obj);
// handle.Completed += obj => { Addressables.InstantiateAsync(obj); };
// handle.Completed += obj => { operationDictionary.Add(location.PrimaryKey, obj); Addressables.InstantiateAsync(obj); };
}
yield return Addressables.ResourceManager.CreateGenericGroupOperation(loadOps, true);
}
System.NullReferenceException: Object reference not set to an instance of an object
at UnityEngine.ResourceManagement.AsyncOperations.ProviderOperation1[TObject].Execute () [0x00061] in ./Library/PackageCache/com.unity.addressables@1d7f6a740e58/Runtime/ResourceManager/AsyncOperations/ProviderOperation.cs:242 UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase 1/<>c__DisplayClass60_0<System.Collections.Generic.IList1<UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle>>:<add_CompletedTypeless>b__0 (UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle 1<System.Collections.Generic.IList1<UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle>>) DelegateList 1<UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle1<System.Collections.Generic.IList 1<UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle>>>:Invoke (UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle1<System.Collections.Generic.IList 1<UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle>>) (at ./Library/PackageCache/com.unity.addressables@1d7f6a740e58/Runtime/ResourceManager/Util/DelegateList.cs:75)
UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase1/<>c__DisplayClass60_0<UnityEngine.ResourceManagement.ResourceProviders.IAssetBundleResource>:<add_CompletedTypeless>b__0 (UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle 1<UnityEngine.ResourceManagement.ResourceProviders.IAssetBundleResource>)
DelegateList1<UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle 1<UnityEngine.ResourceManagement.ResourceProviders.IAssetBundleResource>>:Invoke (UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle`1<UnityEngine.ResourceManagement.ResourceProviders.IAssetBundleResource>) (at ./Library/PackageCache/com.unity.addressables@1d7f6a740e58/Runtime/ResourceManager/Util/DelegateList.cs:75)
UnityEngine.AsyncOperation:InvokeCompletionEvent () (at /Users/bokken/build/output/unity/unity/Runtime/Export/Scripting/AsyncOperation.cs:24)
aa.zip (6.2 KB)
