Attempting to load an addressable scene asset using packed assets, but the process keeps failing; with the following errors:
Exception encountered in operation Resource<IAssetBundleResource>(defaultlocalgroup_unitybuiltinshaders_4751764e89112362a9cfa2c511628540.bundle): Object reference not set to an instance of an object
Exception encountered in operation Dependencies: Object reference not set to an instance of an object
UnityEngine.ResourceManagement.AsyncOperations.GroupOperation:OnOperationCompleted(AsyncOperationHandle)
DelegateList`1:Invoke(AsyncOperationHandle) (at Library/PackageCache/com.unity.addressables@1.12.0/Runtime/ResourceManager/Util/DelegateList.cs:69)
UnityEngine.AsyncOperation:InvokeCompletionEvent()
Exception: Attempting to use an invalid operation handle
UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle.get_InternalOp () (at Library/PackageCache/com.unity.addressables@1.12.0/Runtime/ResourceManager/AsyncOperations/AsyncOperationHandle.cs:306)
UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle.get_Result () (at Library/PackageCache/com.unity.addressables@1.12.0/Runtime/ResourceManager/AsyncOperations/AsyncOperationHandle.cs:366)
UnityEngine.ResourceManagement.ResourceProviders.SceneProvider+SceneOp.Execute () (at Library/PackageCache/com.unity.addressables@1.12.0/Runtime/ResourceManager/ResourceProviders/SceneProvider.cs:58)
UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase`1[TObject].InvokeExecute () (at Library/PackageCache/com.unity.addressables@1.12.0/Runtime/ResourceManager/AsyncOperations/AsyncOperationBase.cs:461)
UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase`1[TObject].<.ctor>b__33_0 (UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle o) (at Library/PackageCache/com.unity.addressables@1.12.0/Runtime/ResourceManager/AsyncOperations/AsyncOperationBase.cs:112)
DelegateList`1[T].Invoke (T res) (at Library/PackageCache/com.unity.addressables@1.12.0/Runtime/ResourceManager/Util/DelegateList.cs:69)
UnityEngine.Debug:LogException(Exception)
DelegateList`1:Invoke(AsyncOperationHandle) (at Library/PackageCache/com.unity.addressables@1.12.0/Runtime/ResourceManager/Util/DelegateList.cs:73)
UnityEngine.ResourceManagement.ResourceManager:Update(Single)
MonoBehaviourCallbackHooks:Update() (at Library/PackageCache/com.unity.addressables@1.12.0/Runtime/ResourceManager/Util/MonoBehaviourCallbackHooks.cs:15)
here’s my loading code:
Addressables.LoadSceneAsync(AddressableScene, LoadSceneMode.Additive).Completed += obj =>
{
if (obj.Status == AsyncOperationStatus.Succeeded)
{
handle = obj;
OnSceneLoaded?.Invoke(this);
}
else
{
Debug.LogError($"Error Loading scene {AddressableScene.Asset.name }: {obj.OperationException} ");
OnSceneLoadFailed?.Invoke(this);
}
};
I can see that the shader bundle exists; but the operation keeps failing for some reason.
This all works in asset mode in the editor of course