Addressables cant load JSON files/structs?

error:
Exception encountered in operation UnityEngine.ResourceManagement.ResourceManager+CompletedOperation`1[iData], result=‘’, status=‘Failed’: Exception of type ‘UnityEngine.AddressableAssets.InvalidKeyException’ was thrown., Key=Assets/0 Addressables/Weapons/BroadSword.json, Type=iData
UnityEngine.AddressableAssets.Addressables:LoadAssetAsync(Object)

calling code:
EntGod entGod = GetComponent();
AsyncOperationHandle dataHandle = Addressables.LoadAssetAsync(“Assets/0 Addressables/” + entGod.DetermineAssetFolderAndFile(spawnedItem.name) + “.json”);
yield return new WaitWhile(() => !dataHandle.IsDone);

file location:

file content:

How to do this? (BTW, folder is marked as addressable and the code worked before with scriptable objects

i think it may be that LoadAsset loads .asset files only? i dont know

Try loading that as a <TextAsset>.

5 Likes