So, you can load levels asynchronously and stream assets from asset bundles asynchronously - is there any way to instantiate prefabs asynchronously? The AsyncOperation class looks promising, but it doesn’t look like it currently supports anything related to instantiation.
The reason I ask is that we are instantiating prefabs in our game and the moment we do the instantiation, the gamed sputters to a halt for a moment. One solution is to pre-instantiate everything at level load and deactivate them until needed, but this just seems to shift the wait time to the loading screen - without some sort of Async operation, you’ve got to pay for it somewhere.
A better solution, in my mind, would be to have like an “InstantiateAsync” function or something that would load the object in the background and have it “pop” into existence when finished rather than halting the game. Maybe allow for a callback/event when it finishes loading. Is this something that is simply not possible with Unity’s current architecture, or are there plans for this?
And as a short term solution, would it possible to use LoadLevelAdditiveAsync to essentially mimic this sort of functionality? For example, if you placed all your prefabs in a level file and then loaded that level file asynchronously - would there be any benefit to doing things this way, or would it ultimately not provide any gain?
Thanks a lot, I’d love to hear some insight into this stuff! ![]()