Forum rules - please read before posting.

Error on loading

edited April 2023 in Technical Q&A

Hi I'm using AC 1.76.0 and Unity 2021.3.14f1

When I load the game I get this error. I noticed especially it was happening after I save the game using action list used to add an item to the inventory. I was using the action Save: Save or load action to save the game. It happens to any item I add and save.

InGame_TurnOff is the Action list asset I use to turn off other menus when the InGame menu is turned off.

Tried moving all the Actionlist assets to Resources folder but still the same error.

Here is the error.

UnityEngine.AddressableAssets.InvalidKeyException: Exception of type 'UnityEngine.AddressableAssets.InvalidKeyException' was thrown. No Location found for Key=InGame_TurnOff
UnityEngine.AddressableAssets.Addressables:LoadAssetAsync<AC.ActionListAsset> (object)
AC.ActiveList:LoadData (string,AC.SubScene) (at Assets/AdventureCreator/Scripts/ActionList/ActiveList.cs:472)
AC.ActionListAssetManager:LoadData (string) (at Assets/AdventureCreator/Scripts/Managers/ActionListAssetManager.cs:291)
AC.SaveSystem:ReturnMainData () (at Assets/AdventureCreator/Scripts/Save system/SaveSystem.cs:1414)
AC.SaveSystem:InitAfterLoad () (at Assets/AdventureCreator/Scripts/Save system/SaveSystem.cs:666)
AC.MultiSceneChecker:RunStartProcess () (at Assets/AdventureCreator/Scripts/Game engine/MultiSceneChecker.cs:123)
AC.MultiSceneChecker:Start () (at Assets/AdventureCreator/Scripts/Game engine/MultiSceneChecker.cs:55)

Comments

  • edited April 2023

    After a little investigation. I narrowed the cause to the ActionList when turn off field of the InGame menu. Any actionlist asset listed in this field is causing addressables to give this error. If the field is empty I don't get any error. And interestingly this is the only scene with this problem. I don't have this problem in another scene of the same project.

  • I'm not sure of the circumstances surround it, but it looks like the ActionList is being included in the save data.

    As you're using Addressables to handle asset data, you need to make it an Addressable with a key that matches its filename, i.e. InGame_TurnOff.

  • Thank you for the advice. I did what you said and it looks like work around for now. Thank you.

  • Okay after making the InGame_TurnOff actionlist asset I got the same error for Inventory_TurnOff. I made that also an addressable. But my main concern now is that is it going to cause more problems going ahead?
    Is it okay to make asset actionLists as addressables?
    Will AC be able to fetch them form the servers without problems?
    If we don't address the cause of this problem will it destroy the project with bugs?

    Thank you for your advice. The project is getting huge and I'm not a programmer and so I'm a little worried about the project's health.

  • The underlying issue occurs because AC is wanting to save data about those ActionLists, though I couldn't tell the reason from your description alone.

    If you enable the AC Status box, it'll list any currently-running ActionLists. Do InGame_TurnOff and Inventory_TurnOff display at the time you save, and is it correct that they do if so?

    You can make ActionList Addressables - but you only need to in this case because you're already using Addressables for your save data. Any process involving grabbing Addressable ActionLists would be the same as grabbing other Addressable assets.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.