Can I use C# scripting and Javascript in the same project?
Hello sir, follow this link http://answers.unity3d.com/questions/601572/unity-talking-to-arduino-via-wifiethernet.html "Unity talking to Arduino via WiFi/Ethernet" that you shared your answer, I have tried to use your code in unity but the problem is javascript cannot find C# class and error. How can I solve this problem?
I have a JS script in my totally C# project so i guess yeah. That being said, my single JS code does not try to access any C# classes. If you create a dll from the "odd" files you should be able to use them without problems.
Answer by tanoshimi · Feb 02, 2017 at 03:58 PM
Move the c# files into the /Standard Assets folder to make that be compiled at an earlier stage and thus accessible to your js scripts. https://docs.unity3d.com/Manual/ScriptCompileOrderFolders.html
Answer by TheGejr · Feb 02, 2017 at 04:29 PM
Yes you can, but i would highly recommend to chose one of the two and stick with it the rest of the project. In my experience it tend to get funky when i have scripts in different languages. Unity is optimized for C# and JS doesn't want to access my C# scripts so i would recommend C#.
Your answer
![](https://koobas.hobune.stream/wayback/20220612110153im_/https://answers.unity.com/themes/thub/images/avi.jpg)