Multithreading - fyi

Came across this article (sponsored;-) on multi threading gameplay, as I was researching if Unity was multi thread capable.

Building a Highly Scalable 3D Particle System

The link to the intel demo/source is
http://software.intel.com/sites/billboard/va-magazine/issue-06/articles/ticker-tape/ and http://software.intel.com/en-us/articles/tickertape/

I guess we will have to wait for a while for Unity MT support?

Would be nice to support 2 cores. I looked at the webplayer stats recently, and it shows 2 cores as being most common (from memory).

Scripts in one core and PhysX in the other - cool!

I thought you could spawn multiple threads in Unity to run your custom logic, but you just can’t affect any of the Unity components unless it’s on the main UI thread?

This is correct, if you feed threadsafe datastructures with the data (-> System.Collections.*) and read the data from there in the main thread for usage on models etc then its no problem generally

FYI, not all classes in System.Collections.* are threadsafe though, dreamora. e.g., Dictionary

I know, thats why I explicitely mentioned it. But its important to keep in mind about the restrictions there and visit go-mono (don’t go to msdn for this kind of stuff as you might end on the wrong end of the stick ;))

I misunderstood; I thought you were saying you could pass and use those datastructures around as though they were threadsafe.