I have a setup where a method is marked with
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.AfterSceneLoad)] and it calls Addressables.LoadAssetAsync("Label") and then WaitForCompletion().
However, when I have Remote Catalog turned on with a Local Host that is not enabled
the editor freezes (or if built, the app hangs).
When I turn on the local host, it works normally.
This behaviour causes for concern because when the server is unavailable, the app would hang.
Setting a timeout does not work.
When I debug it, it is infinitely looping in the WaitForCompletion. So I pause the debugging and force it to throw an exception. It then continues normally.
It’s as if Addressables hasn’t been initialized yet. So which I tried calling Addressables.InitializeAsync and also WaitForCompletion, but I’d get the same loop.
The bundle itself is configured to use the Built-In paths. So I expected it to load just fine as a Streaming Asset. But as soon as Remote catalogs are enabled, it freezes when the online location is not available.