Creating and rendering big, procedural meshes for the first time can cause hickups for some seconds. My question is as simple as: Is it possible to slowly process such resource-demanding tasks/scripts in the background, so the game continues running with a smooth FPS-Rate?
You can use System.Threading, with the restriction that the Unity API generally cannot be used in threads, only thread-safe .NET functions. So the usual thing is to do the heavy calculations in your own thread and then call the necessary Unity functions in the main thread when the calculations are done.
I do most of the processing at the beginning of the scene (It’s basically a procedurally generated terrain). So for the beginning, it’d be enough if I can have some loading screen showing that the scene is loaded (without hickups) OR the scene shows up instantly and one can see how the generated terrain expands (like in Minecraft. My Terrain isn’t made out of blocks, though).
Now it’s like the scene shows instantly, there’s a 3 seconds freeze and the terrain pops up.