- Home /
Can any part of the Unity API be used in threads ?
I know that the Unity API can only be used from the UI thread.
However, I don't see how it would cause data races or other problems if I were doing some basic calculations using Vector3 in separate threads, as long as each thread plays with its own Vector3 instances.
My game is animating tiles of water by updating the meshes every frame using simplex noise. This is really killing the CPU when I increase the vertex resolution of these water tiles. Spreading the load across four threads (or more) would really speed up my game. Since these calculations do not depend on the result of one another and can be made in parallel, I don't see why Unity wouldn't let me do it.
So my question is : can I use Vector3 objects from other threads ? And if yes, are there any other part of the Unity API that could be used in other threads ?
Thank you.
Your answer
Follow this Question
Related Questions
How to periodically pull output from an IJobParrallel or is there a better way to do this? 1 Answer
Using admob rewarded ad in unity singleton pattern 0 Answers
How do I call a function in a different CPU core? 2 Answers
Unity Jobs/DOTS Vs Compute Shader 0 Answers
Best Practice for Multithreading Procedural Terrain Generation? 1 Answer