Hello. I am integrating a camera control algorithm in a Unity project and, for performance reasons, I would like to execute it in a separate thread, or possibly more than one. This would allow me to:
- have the camera control algorithm running in parallel with the rendering, and
- exploit all the computational power from the machine, e.g. 4, 8 cores.
While, the first might be accomplished with coroutines, the second can not (but correct me if I got it wrong). In my understanding the Unity API is not thread-safe, however I only need to read from the transform tree and perform ray-casting, therefore I need no writing on the Unity data structures. Is it safe to do it? In case it is not, is this one a viable solution?
PS: on the features page they mention "Cooperative Multi-Threading", so I might be just missing some information.
Thank you,
Tommaso