- Home /
Duplicate Question
Continue game before function finishes?
I have a function that carries a heavy load, involving alphamaps and terrainData that takes about .5 seconds to execute. Unfortunately, this pauses the game (essentially) until the function returns. It would appear that even though the game lags, it still accepts input and it voids some of my checks allowing things to end up in a place they should not be.
Any help is appricated! Thanks for your time!
Do some research before asking questions. There are a ton of questions about doing things asynchronously.
How about a link to one such a duplicate? http://answers.unity3d.com/questions/740531/had-difficulties-implementing-intro-to-coroutines.html
Follow this Question
Related Questions
Scripts freezes game for a few seconds after build. 1 Answer
Web Player occasionally lags browser 1 Answer
Game Freezes upon successive loads 0 Answers
Music lags on client when connected to server 1 Answer
Function to locate game object with smaller distance to target makes the game lag - UnityScript 1 Answer