Function ambient_api_core::global::block_until
source · pub async fn block_until(condition: impl Fn() -> bool)
Expand description
Stops execution of this function until the provided condition
is true.
Useful for waiting for something to happen in the game world.
This must be used with .await
in either an async fn
or an async
block.