- Home /
Using LINQ in Unity
I was wondering if there are any known issues with using LINQ in Unity. I use a good bit for some editor scripts, but was unsure about using it during game runtime.
I haven't seen a post/article with a definitive answer either way, and was wondering if someone know for sure ( in terms of speed/performance, compatibility issues etc)
This might be a dumb question, but I would like to avoid surprises.
Thanks in advance.
Answer by whydoidoit · Jul 04, 2012 at 02:33 PM
There are a couple of problems with Linq in UnityScript (the 2 parameter version of ToDictionary emits code that fails at runtime for instance), but generally no - it works fine and I use it everywhere. Everything works in C#
Becareful not to make something very slow by having too many loops and iterations in what looks like short code.
Your answer
![](https://koobas.hobune.stream/wayback/20220613073711im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
A node in a childnode? 1 Answer
Distribute terrain in zones 3 Answers
Unity: C#: Eyes look at mouse: HELP!! 3 Answers