- Home /
Use a copy of unity API in new thread
I've heard that the Unity API isn't threadsafe, but I've been thinking. Since I can define my own class and create an instance and have it run in a thread just fine, why can't I just create a new instance of the Unity Api for a thread? Is this possible? I'm really hoping there's a way to do this since calculating meshColliders for procedurally generated meshes at runtime is really slowing things down, and I can't move it to a different thread(due to thread unsafeness). Would this be possible?
Answer by Eric5h5 · Aug 25, 2012 at 03:43 PM
That's not possible.
Dang, I guess I was really hoping it was possible since you could create a thread using your own class as a parameter. I tried making my own class for threading that was derived from $$anonymous$$eshCollider, but Unity didn't allow it.
Your answer
Follow this Question
Related Questions
Why Unity API is not thread safe and can only be run on the main thread 1 Answer
Get TouchScreenKeyboard instance from when clicking InputField on Mobile 2 Answers
NullReference Exception when adding a class 2 Answers
What for are PlayerPrefs with 2 or more Scenes? 1 Answer
Setting a variable in individual versions of an instantiated object 1 Answer