too many threads

When i am running a scene I get the error ‘too many threads’ in a small pop-up box.
It then crashes Unity.
What could be causing this in my code?

Do you use a unity sample project or did you implement something yourself?

I was calling a wwwform function from within onGUI. I suspect it was calling too many instances of the same function at once so ive changed it to be a coroutine that only gets called once now. thanks

Ah I see.
Never use a locking function in OnGUI / Update / FixedUpdate as those functions are called each frame, independent if the previous one has already finished.

Wise words. But how to call the mothers ?

hu?

generally anything that locks is done in a coroutine