Unity-Technologies / Addressables-Sample

Demo project using Addressables package
1.31k stars 300 forks source link

SpaceShooter DynamicInvoke error while playing #68

Open romhaviv opened 2 years ago

romhaviv commented 2 years ago

Hi, I am new to Addressables and wanted to try the samples in this repo, When I tried to open SpaceShooter with unity version 2021.2.5f1 and played the bootstrap scene, after few frames I got the following exception in console:

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
  at UnityEngine.ResourceManagement.ResourceProviders.AssetDatabaseProvider.LoadAssetAtPath (System.String assetPath, UnityEngine.ResourceManagement.ResourceProviders.ProvideHandle provideHandle) [0x00013] in C:\GitLab\Addressables-Sample\Basic\SpaceShooter\Library\PackageCache\com.unity.addressables@1.19.11\Runtime\ResourceManager\ResourceProviders\AssetDatabaseProvider.cs:46 
  at UnityEngine.ResourceManagement.ResourceProviders.AssetDatabaseProvider+InternalOp.LoadImmediate () [0x000c6] in C:\GitLab\Addressables-Sample\Basic\SpaceShooter\Library\PackageCache\com.unity.addressables@1.19.11\Runtime\ResourceManager\ResourceProviders\AssetDatabaseProvider.cs:112 
  at (wrapper managed-to-native) System.Reflection.RuntimeMethodInfo.InternalInvoke(System.Reflection.RuntimeMethodInfo,object,object[],System.Exception&)
  at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0006a] in <00c558282d074245ab3496e2d108079b>:0 
   --- End of inner exception stack trace ---
  at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00083] in <00c558282d074245ab3496e2d108079b>:0 
  at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <00c558282d074245ab3496e2d108079b>:0 
  at System.Delegate.DynamicInvokeImpl (System.Object[] args) [0x000e7] in <00c558282d074245ab3496e2d108079b>:0 
  at System.MulticastDelegate.DynamicInvokeImpl (System.Object[] args) [0x00008] in <00c558282d074245ab3496e2d108079b>:0 
  at System.Delegate.DynamicInvoke (System.Object[] args) [0x00000] in <00c558282d074245ab3496e2d108079b>:0 
  at UnityEngine.ResourceManagement.Util.DelayedActionManager+DelegateInfo.Invoke () [0x00000] in C:\GitLab\Addressables-Sample\Basic\SpaceShooter\Library\PackageCache\com.unity.addressables@1.19.11\Runtime\ResourceManager\Util\DelayedActionManager.cs:46  5 (target=UnityEngine.ResourceManagement.ResourceProviders.AssetDatabaseProvider+InternalOp) InternalOp.LoadImmediate() @7.347976
UnityEngine.ResourceManagement.Util.DelayedActionManager:LateUpdate () (at Library/PackageCache/com.unity.addressables@1.19.11/Runtime/ResourceManager/Util/DelayedActionManager.cs:159)

any suggestions to why it would happen? when I click unpause it resume and then thrown again :(

Thanks!