Skip to content
Snippets Groups Projects
Commit 3eb968f7 authored by Chang, Ryan's avatar Chang, Ryan
Browse files

More comments

parent d052cc0e
No related branches found
No related tags found
No related merge requests found
......@@ -117,6 +117,7 @@ public class TerrainGenerator : MonoBehaviour
foreach (var thread in generationThreads)
{
// Wait for all threads to finish.
if (thread != null && thread.IsAlive)
{
busy = true;
......@@ -130,6 +131,10 @@ public class TerrainGenerator : MonoBehaviour
{
if (genThread != null)
{
// Apply generated terrain, one at a time.
// This ensures that we don't cause a lag
// spike by applying 9 terrains at the same
// time.
ApplyGeneratedTerrain(genThread);
yield return new WaitForEndOfFrame();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment