Make function not block the game

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By kumikonakashima

Hi everyone,
I have a function that loads chunks of the world when the player gets near the chunk. The function takes about half a second to load the chunk. How do I make it so that the game wont stop to execute the function to load the chunk but rather load the chunk in background or something like that?

:bust_in_silhouette: Reply From: klaas

Hi,
have a look here: