Most of the time my code looks like this, and no matter how you look at it, it wastes visual space as well as adds unnecessary instructions for CPU.
string dataPath = "Assets/Item/xxxxxxxx/Structural/Frame/" + xxxxxxData.name + ".prefab";
AsyncOperationHandle<GameObject> dataHandle = Addressables.InstantiateAsync(dataPath, transform);
yield return new WaitUntil(() => dataHandle.IsDone);
Transform data = dataHandle.Result.transform;
so the first instruction is storing absurdingly long path
second is initializing a HANDLE and storing it
third is waiting until handle is done
fourth is storing the asset
but even worse, whenever u want to use addressables, u will most likely have to go for COROUTINE instead of a method, if you want to do “WaitUntil()” and starting a coroutine adds a lot of instructions for cpu as well as the delay
all that is really not needed, it brings unneccessary instructions, confusion, coroutines, delay, and wastes space in files
Cant we just have normal way to load files synchronously?
I understand that async loading may work better for bigger files or literal collections of files but there are also small or single files that dont benefit on async loading at all
EDIT NVM i see there was sync func added.
so ill use it from now on, but how do you guys work with async funcs? any way to avoid coroutines?