- Home /
Can I use the ray-casting functionality from another thread?
This question is somehow similar to this one however its answer is less obvious and I can't find any help on the forum. Since ray-casting (or line-casting) is a read-only operation, is it possible to perform it from a parallel thread? I know for sure that is possible in release, however debugging is very difficult this way.
Thank you
Answer by jashan · Oct 20, 2010 at 09:33 AM
Even though it may be "read-only", you usually can't access any parts of the Unity API from other threads than the main thread. This includes simple getters (even Application.platform will throw an exception).
Your answer
![](https://koobas.hobune.stream/wayback/20220613080219im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
C# Check Physics.Raycast Once 0 Answers
Raycast hits when missing a collider, misses when hitting a collider? 0 Answers
The CapsuleCast is broken. 0 Answers
Raycast to Terrain (Conditional Statements) 1 Answer
Raycasting not behaving as expected? 2 Answers