Sync Method For Addressables is Necessary

When use async method to load a mesh with collider, I should do many works to make logic wait load finished. Because this mesh may obstruct Player’s movement, or be attacked. And sometime those assets are too munch too preload, so Sync Method maybe the best way to solve this problem

If it is too much to preload, loading it synchronously will cause a stutter, with addressables or without.

I can load one of them synchronously when i need, and other logic will wait. but use addressables I cannot confirm the delay time. if i want to instantiate gameobj immediately, only preload, if i just use one or two of them, it’s waste of memory

Like This Picture

I get your issue, but it is not correct game design to have data loading like this. Synchronous or non-synchronous, you cannot have critical game content loading at critical times.

Thx for your suggestion,but if I want to load some important data, such as config files (e.g. json) or lua script, or some logic needs assets data, like mesh collider, when user’s device is busy,the delay of asynchronous load will be dangerous, because all other logic is runing。So I think add a Synchronous method will be good to deal with some special situation and usually use asynchronous and slipt logic and other thing.
If you have good solution about the problem above, please tell me~

Everyone is trying to tell you to load it before hand. Trying to load it the instant you need it will cause problems no matter how you do it, the bigger the thing, the more noticeable the problems will be.

A solution you can do is load your enemy at the beginning, before you need it. You could create a pool of enemies or something and swap them in and out and move them around.

This is a general game design problem, not an addressables problem.

Edit: But if you really want to, you can just put up a loading screen or something until your addressable is done loading. You don’t need an explicit sync method to do that. You can await with addressables or use callbacks, or promises.