- Home /
Is it possible to use asynchronous functions "in-editor"?
I'm looking at computing the content for and saving a file that will be rather large. Something like 1-million lines of text. I'd like to not block unity for the very long it will take.
From what I've seen, yield doesn't do much in javascript unity from editor code. Is it possible at all to run functions asynchronously from editor code?
Answer by BigBulle · Nov 23, 2011 at 12:17 AM
If you're only writing into a file then you can create a separate thread that do the job. I don't know how to do it in javascript but in c# its quite simple.
Since all languages in Unity use $$anonymous$$ono, you do it the same way in JS that you do in C#.
Hate to say it, but I'm a bit rusty on starting a new thread in C# -or- JS in order to do the job. Care to elaborate on the mono calls?
Don't know if the BackGroundWorker is available in $$anonymous$$ono but it could do the job for you quite easily
Your answer
