Possible Threading Issues?

Doesnt this pattern still not address the issue of multiple threads? It could be possible to cause multiple copies to be created if they were instantiated on different cores/threads at similar times?

In game platforms with true multi-threading, this is indeed a possibility. Within Unity, this generally won’t be an issue because outside of the Jobs system, very little is actually done on a different core. (Prior to DOTS, all scripts ran on the same thread.) Awake() is always ran on the main thread.

While Unity has Coroutines and asych operations they are still not true multi-threading, but are instead more of a timeshare operation.

Privacy & Terms