Problem
I start populating my scene with enemies. If I want to instantiate n enemies of type Enemy_A, that takes time that some other subsystem could be doing something.
Idea
I would like to create a thread that instantiates enemies.
Bigger Problem
It seems that Unity won’t allow me to call the MonoBehavior functions like MonoBehavior.Instantiate() from a thread, even if that thread is independent from Unity. (I got this notion from this Previous Thread Question).
Is there a way around this problem? I thought of using Application.LoadLevelAdditiveAsync but I would prefer something else. Any suggestions?
It was kind of obvious that I read the answers, that is exactly what I am citing above. It might not have been obvious, to you at least, the question and answers are from 2011 and there might be new information on the matter. Thank you though, now I know there is nothing new.
– FunctionRWell, that won't change in the future. The way the api works, they would need to implement tons of locks / semaphores / other synchronizing methods to make everything thread-safe. That would have a horrible impact on performance. The chance that they change this in any future version is below 1%
– Bunny83