I have kind of huge miss-understanding - how to calculate something heavy in separate thread, get result, and "continue main routine". I'm developing board game, and tasks of "board checking" and "AI thinking" takes cpu hard, so I'm trying to separate calculations to another thread.
I'm not .NET programmer, mostly c++, I read a lot about coroutines and threads in c sharp and unity3d for last 4 days, but now i just got full mess in my head, completely loosing any kind of "what to do".
I found, that unity still use .NET2, so no TPL or TPLv3 can be used. I was looking for Foundation Tasks library ( https://github.com/NVentimiglia/Unity3d-Foundation/wiki/4)-Unity-Tasks ), but cun't understand how to use it for my case. I'm looking at examples and feel myself idiot. I was trying to write mix of threads and coroutines by myself, but now just got full code messy without any working results =(
Can anybody give my any simple example of my case: when unity object do some have calculations in other thread, getting result of it's work and continues "normal behaviour".