0
Answered

A question about LoadSceneAsync and Async Operation

TowerCrow 3 months ago updated by Lazlo Bonin (Lead Developer) 3 months ago 1

Does Bolt fully support LoadSceneAsync? I know Bolt does not support Async/Await due to it being a live mode limitation. Does that mean LoadSceneAsync behaves like a regular LoadScene?

I'm trying to load a scene additively with LoadSceneAsync but it produces a huge lag spike despite the scene being lightweight. Trying to use "Async Operations" to code a loading bar was similarly unsuccessful. The code doesn't trigger.

Bolt Version:
1.4.5
Unity Version:
2019.1.9f1
Platform(s):
Scripting Backend:
.NET Version (API Compatibility Level):
Answered

Hi TowerCrow,

Yes, Bolt does support this "kind" of async operations which is in fact just a coroutine's yield instruction.

You can replace your While Loop unit by a Wait Until unit and the lag spike should go away. Note that this requires your input flow to be a coroutine.