Hello,
I’m trying to thread Libnoise so that unity won’t freeze while it generates maps. I have no experience threading; though, I’ve done my reading on the topic. As far as I can tell its working, as in libnoise is working in its own thread but unity still stops rendering frames for the duration.
In update, on event:
Thread t = new Thread(() => { Generate(); }); // Generate sets up a Noise2D w/ LibNoise
t.IsBackground = true; // do I need this? It should be a background process but...
t.Start();
while (t.IsAlive) Thread.Sleep(100);
SetTexture(); // updates an objects texture
I want generate to run concurrent to unity’s main thread. Any advice?