Implementing Neural Network into Unity. Lots of calculations.
Hello, I am just beginning to create Unity games. The one I am currently working on is more a 'Proof of Concept'. It captures some data, sorts it, picks some values, sorts it back, and then goes through the Neural Network. It is a lot of calculations. It can not be done in a single frame. I tried using Ienumerators and starting lots of Coroutines, but it has been for naught because yield return doesn't preform well with While() loops. I am using QuickSort, which calls QuickSort(), Partition(), and also an AbsValue() for comparison. Making all of these coroutines is exceptionally difficult.
I was thinking about creating a recursive Quicksort, but I wanted to confirm that Coroutines are okay with that. I fear they might attempt to execute the recursion in one frame and just freeze up all unity like with the while() loops.
I want to call these functions and have them execute in the background. They will require some amount of overhead. Can anyone offer me a suggestion that I am not aware of?