Adding multithreading support
Hi there,
As some of you may have experienced, currently the UnityGLTF library blocks the main thread when importing models containing complex geometry and/or textures. Although the coroutine approach is used in the project, sometimes multithreading may be a better solution as it provides a non-blocking behavior as well as better performance (in some situations) Please see #221 for details!
Performance HUGE frame rate increase for certain models containing complex geometry and/or textures. I observed up to 500% fps increase for this model on a Windows desktop computer. In general, it should increase your fps and/or decrease the main thread freezing time. It should not make any tangible negative impact to the loading time, if no faster loading is observed.
Comparison Chart
Model 1: Complex link
Model 2: Complex link
Model 3: Simple link
Model 4: Simple link
Test performed 3 times for each model and each importer (original vs proposed).
Test machine: Windows 10 64 bit, i7 7700K, GTX 1070, SSD.
Reference: #216
Thanks for the contribution!