We are using the MAPIEx.dll to convert some data into XML via Unity - it works fine, but the problem is that Unity completely freezes when this process is running (which can take up to a minute). I did post about this before, but didn't get much of a response~ I was wondering what others are doing when using external DLL's? Ive tried Co-routines which don't seem to work. I know we can use multi-threading, but I'm not sure about that via p-invoke for unmanaged code and if this is even a good idea in Unity. Some feedback from OTEE or someone else who's hit this problem before would be great...thanks! Shaun
Coroutines won't work for this, because they're not threads. I can't see why carefully using threads for this shouldn't work. Especially if you make sure you don't call into the same library more than once at the same time (at least unless it's re-entrant). d.
Thx David - Will look into running the processes in a different thread. When we invoke the DLL, it's obviously running on a PC client (as there is no MAPI on Mac). I'm not sure I understand correctly, but is Mono still being used by Unity when running on PC, or are we running on native .Net? (and if so, can we use .Net2 for platform specific C# scripts? - i.e. ones that will never be run on a Mac)