Hi guys. I want to load my asset synced. I’m using the following code but the editor freezes when I running it.
It’s posible to load assets synced?
Hi guys. I want to load my asset synced. I’m using the following code but the editor freezes when I running it.
It’s posible to load assets synced?
I’ll flag for the team to provide some input. The editor freezing is never intended behavior, though. If you haven’t already, could you file a bug report for us? Unity QA: Building quality with passion
This was widely known as “expected result” so far, good to know that this is not the official position. If that was supported it would finally kill the necessity of a sync API that so many have already requested.
Wanted to pass along an update from the team. They are currently working on this, with team members currently exploring synchronous Addressables
Would be nice that’s for sure!
Currently trying to do a Scene completely built at runtime, which spawns
generic objects from pools which themselves load addressables.
The main controller needs access to those addressables to get references,
so everything has to wait. The more I try to put things outside the addressables
the less the whole system is worth it.
A single scene only uses about 20% of all addressables, so I didn’t want them all loaded.
Have ended up just using a “bool runFlag” at start of Update and FixedUpdate,
Nobodies doing anything until everything is setup and initialized,
then set them all true, fade in, everything Go at the same time!
Likely better ways to do it, looks a bit messy but it works. Moving forward…
That’s my Use Case, using Local Groups but Remote would be the same problem.
If you spawn everything under a disabled gameobject you will remove the need of the runflag at all, I don’t think that a synchoronous api is needed there (the opposite btw, as it will freeze the application until everything is loaded for you).
Runtime synchronous load is more useful for stuff like procedural generation and character customization, where you don’t know exactly which resources will be used ahead-of-time, but still you don’t want to load every-single-choice as it would be a waste of memory.
I looked at spawning disabled, but ended up just moving the same problem up to another parent.
just cleaning up the Code now… nice comment I just removed;
// can’t get Ref. because it hasn’t loaded yet. damn async 5h1t! goodnight…