Forum rules - please read before posting.

Scene Addressables

Hello
Trying to optimize I am using "Load scenes from Addressables" and it works when using Action List: Scene Switch, but when there is a saved game file and I want to load it, AC keeps referring to the scene by its name used in the Build Settings , not as an Addressable.
I'm probably doing something wrong, I'm referring to scenes by name, and "Load scenes Asynchronously" is checked too, AddressableIsPresent is defined in PlayerSettings.

In the scene changer script add the line: Debug.Log ("Load scene: " + nextSceneName); Because that's how I saw that you recommended someone in the forum and there I realize that they are trying to load the scenes by their name and not by Addressable, the error that occurs is:
OperationException : ChainOperation failed because dependent operation failed
UnityEngine.AddressableAssets.InvalidKeyException: Exception of type 'UnityEngine.AddressableAssets.InvalidKeyException' was thrown. No Location found for Key=AssetsScenesFARM
UnityEngine.ResourceManagement.ChainOperationTypelessDepedency1<UnityEngine.ResourceManagement.ResourceProviders.SceneInstance>:OnWrappedCompleted (UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle1<UnityEngine.ResourceManagement.ResourceProviders.SceneInstance> )
DelegateList1<UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle1<UnityEngine.ResourceManagement.ResourceProviders.SceneInstance>>:Invoke (UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle1<UnityEngine.ResourceManagement.ResourcePro viders.SceneInstance>) (at Library/PackageCache /com.unity.addressables@1.19.19/Runtime/ResourceManager/Util/DelegateList.cs:69) UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle1<UnityEngine.ResourceManagement.ResourceProviders.SceneInstance>:WaitForCompletion()
AC.SceneInfo:Open (bool,UnityEngine.SceneManagement.LoadSceneMode) (at Assets/AdventureCreator/Scripts/Game engine/SceneInfo.cs:190)
AC.SceneInfo:Open (bool) (at Assets/AdventureCreator/Scripts/Game engine/SceneInfo.cs:81)
AC.SceneChanger/d__57:MoveNext() (at Assets/AdventureCreator/Scripts/Game engine/SceneChanger.cs:1131)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

Comments

  • Where are you adding such a line, and what are your versions of AC, Unity, and Addressables?

    Are the save files made after the enabling of the addressable-loading option, and what are the scene filenames vs their Addressable key names?

  • Hello, in Asset Management, I went to Addressable Groups and I clicked on "Simplify Addressable Names" for the scenes, and now it is referring to the scenes via Addressable, what was preventing AC from finding the scenes was apparently the use of "/" in the Addressable name

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.