I noticed that the Raycast-related APIs are only allowed to be called on the Main Thread.
However, I would like to perform a Raycast within ProcessAnimation(threaded AnimationJob in an AnimationScriptPlayable). Is there a way to do this?
RaycastCommand.ScheduleBatch is implemented to call Raycast in a thread, so it is feasible from an implementation perspective. Why does there not exist a thread-safe API like RaycastThreadSafe()?
Or is this related to the process order of the animation system and the physics system?