I have an addressable folder with game data which I load on runtime. Everything works fine until I add a Scriptable Object inside that folder, then I get this Exception and the loading process fails:
Exception thrown in DynamicInvoke: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. —> System.NullReferenceException: Object reference not set to an instance of an object
.
.
last line:
UnityEngine.ResourceManagement.Util.DelayedActionManager:LateUpdate () (at Library/PackageCache/com.unity.addressables@1.18.15/Runtime/ResourceManager/Util/DelayedActionManager.cs:159)
The weird thing is when I delete the Scriptable Object and recreate it, it works for some time and then it randomly starts throwing the exception again.
The problem was that the class name of the Scriptable Object was different from its file name.
So apparently the SO lost the reference to the script after some time and couldn’t recreate it because it couldn’t find the file with the same name.
Unity actually triggers a warning because of this, but unfortunately I didn’t see it because I had warnings hidden.
I’m getting this exception (1000x in < 1 second) suddenly after upgrading from 2020.3.22f1 to 25f1. If I downgrade back to .22 it’s gone again. Rebuilding my Addressables doesn’t help at all. No Scriptable Objects at all either.
Using Addressables 1.18.19. Upgrading to 1.19.13 or 1.19.15 now I get different exceptions for all of my prefabs (which are also happening during DelayedActionManager.InternalLateUpdate line 159):
Exception: Unable to load asset of type UnityEngine.GameObject from location Assets/AddressableData/Prefabs/Test.prefab.
Kindly if anyone have any solution may be any blog, video or anything ,do share here Thanks in advance Error:
UnityEngine.AddressableAssets.InvalidKeyException: Exception of type ‘UnityEngine.AddressableAssets.InvalidKeyException’ was thrown. No MergeMode is set to merge the multiple keys requested. Keys=, Type=TestScriptableObject
UnityEngine.AddressableAssets.AssetReference:LoadAssetAsync ()
AddressableManager:AddressableManager_Completed (UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle1<UnityEngine.AddressableAssets.ResourceLocators.IResourceLocator>) (at Assets/AAAAA Addressables/Scripts/AddressableManager.cs:67) DelegateList1<UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle1<UnityEngine.AddressableAssets.ResourceLocators.IResourceLocator>>:Invoke (UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle1<UnityEngine.AddressableAssets.ResourceLocators.IResourceLocator>) (at Library/PackageCache/com.unity.addressables@1.19.19/Runtime/ResourceManager/Util/DelegateList.cs:69)
UnityEngine.ResourceManagement.ResourceManager:Update (single)