UnityEngine.AddressableAssets.InvalidKeyException: Exception of type 'UnityEngine.AddressableAssets.InvalidKeyException' was thrown. No Asset found with for Key=EventData. Key exists as Type=UnityEditor.DefaultAsset, which is not assignable from the requested Type=UnityEngine.TextAsset
UnityEngine.AddressableAssets.Addressables:LoadAssetAsync<UnityEngine.TextAsset> (object)
Script.Resource.AAResourceManager:LoadDataAssetAsync<UnityEngine.TextAsset> (string) (at Assets/Script/Resource/AAResourceManager.cs:15)
GameManager/<GetDatas>d__7:MoveNext () (at Assets/Script/Manager/GameManager.cs:63)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<System.Collections.Generic.Dictionary`2<System.Type, byte[]>>:Start<GameManager/<GetDatas>d__7> (GameManager/<GetDatas>d__7&)
GameManager:GetDatas ()
GameManager/<Init>d__6:MoveNext () (at Assets/Script/Manager/GameManager.cs:53)
System.Runtime.CompilerServices.AsyncVoidMethodBuilder:Start<GameManager/<Init>d__6> (GameManager/<Init>d__6&)
GameManager:Init ()
GameManager:Awake () (at Assets/Script/Manager/GameManager.cs:35)
解决方法:文件由.dat后缀改为.bytes后缀就可以了。
原因猜测:Unity中,.bytes文件被视为TextAsset类型的文件.dat不是?