Thanks for update but encountered one error so far
Exception encountered in operation CompletedOperation, status=Failed, result=UnityEngine.ResourceManagement.ResourceProviders.SceneInstance : Exception of type ‘UnityEngine.AddressableAssets.InvalidKeyException’ was thrown.,
when loading a scene via:
AsyncOperationHandle scene = Addressables.LoadSceneAsync(fullPath, mode, true);
in Fast mode only
Digging in a bit more, the above has worked fine until this version
any luck?
my whole function is broken after upgrading from 1.10 to 1.16 .
Addressable now not recognising if there is a change in the build… Not downloading the update.
Getting CRC error and
Addressables.GetDownloadSizeAsync is always 0.
These happens after upgrade.
We’re having issues loading CSV assets from a folder marked as addressable. Only in Fast Mode, too. This is in v1.16.1. The previous version (1.15.1 didn’t exhibit these issues). I’m able to hack around it.
As a side note, I’d fully recommend writing a wrapper around the addressables API, so that if issues arise arise, you can fix them inside MyAddressablesWrapper.LoadAssetAsync
Hi - I am investigating these issues. There seem to be a few things going on in this thread so I am trying to clarify the problems.
First, it seems like loading scenes from folder marked as addressable is broken in 1.13 - From my testing it appears that this is fixed in 1.16 (possibly earlier).
There also seems to be an unrelated issue with upgrading to 1.16 - something about data not getting built and the crcs not matching - I will need more info to investigate that issue: editor version?, was there a full data rebuild? If we can get a simple repro project that would help a lot.
Loading csv files from a folder marked as addressable was probably broken for the same reason as the scenes, but I don’t know for sure - I would need more details on how the CSV files are read.
Thanks everyone for the feedback.
Hi PBurslem, thanks for looking into them,
Our issue was simply in 1.16.1, we cannot load scenes in Editor in Fast mode only. I’ve done a local workaround but the catalog is not picking up folders that just contain scenes.
I tried to repro this - I put a scene into a new folder, marked the folder addressable, then loaded the scene via the address (folername/scene.unity) and it worked as expected. Is there something I am missing in my repro that you may be doing?
using UnityEngine;
using UnityEngine.AddressableAssets;
public class LoadSceneTest : MonoBehaviour
{
void Start()
{
Addressables.LoadSceneAsync(“scenes/asas.unity”, UnityEngine.SceneManagement.LoadSceneMode.Additive);
}
}
Addressables.InitializeAsync().Completed += (op) =>
{
IList list = op.Result as IList;
foreach (IResourceLocation irl in list)
{
// Scenes appeared here pre 1.16.1
}
}
The Result of Addressables.InitializeAsync() is AsyncOperationHandle, not IList but I think I know what you were getting at and I see the issue. The public IEnumerable Keys property of IResourceLocator used to have ALL the keys and now it doesn’t. It only contains all of the explicitly defined asset entries. Folders are not expanded until needed, etc… This was done as an optimization in order to not have to enumerate every possible addressable asset - when there are 10k+ entries with many of them folders (which could each expand to thousands), this could take very long. The new “Fast Mode” generates a minimal set of data when addressables initializes and defers as much work as possible to the individual Locate calls. This spreads out the cost of enumerating all assets and ends up being pretty negligible per load call. The downside is that the locator only knows about keys for the explicit entries. In order to make something like the Keys property (which pre-existed these optimizations) work as it did, we would have to enumerate and expand all folders. The first call to the Keys property could be VERY costly. I will add a ticket to add this, but it could be a very slow call. Do you actually need the Keys property for your project or are you just using it to show that the scenes are not showing up? The Locate method should work correctly and you should be able to load scenes and assets that are in folders even if their keys do not appear in the Keys property.
We are just parsing the catalog so we can store off the IResourceLocation to get quick access to loading assets later on and to store the asyncop handle off once loaded so we can release correctly later ( and also check an asset is loaded ) - this is just all wrapped up in a class for our convenience. This has been working fine up until 1.16.1.
I think a few folks have used this pattern in some of the threads from a while back.
I have implemented a workaround as it is editor and fast mode only so not the end of the world.
If there is another way of dealing with this then i am all ears thnx
Hi, guys. Just want to add some input in this thread over 1.16.1 from Unity 2019 LTS. As I have tried the last couple of days to get this Addressables thing to work with simplest task (remote content update), I can tell you that either is documentation is not up to date or I am doing some stupid things each time.
The problem is when I try to update the remote content on the existing build (created with previous addressables content) it Is not getting updated.
var locations = await Addressables.LoadResourceLocationsAsync(label).Task;
foreach (var location in locations)
await Addressables.InstantiateAsync(location).Task;
This code always returns an old data and not the new one on the cloud.
Want to know if there are any issues with Update previous build command as it doesn’t seem like to be as stable as Build new content command.
Any help is appreciated.
THIS GOT SOLVED.
Problem was outside of the Addressables package. As far as I used Google Cloud storage with public access.
Their docs says that each object is getting cached for 3600seconds by default and thus you will receive it once you uploaded them for the next hour (even if you removed them from bucket or updated by another files).
Got solved by running cloud shell command: