- Home /
Which backend scripting build is required for Websocket-sharp? (IL2CPP or .NET)
I am writing an application where I need to throw information using websockets. I came across the websocket-sharp library. As given in the guide, I have put the .dll file inside the Assets/Plugins/
location. However, often it happens that after a restart of my system of unity, it starts throwing an error as Websocket sharp namespace or directive could not be found
. I have to reimport or copy and paste. Also some of the related scripts or resources based on Websockt sharp like unityros, while building with .NET backend scripting fails to build throwing errors for includes like:
using System.Threading
using WebsocketSharp
a fix I found was to use:
#if UNITY_EDITOR
using System.Threading
using WebsocketSharp
#endif
and also need to add functions within the same if and endif conditions that use those include headers (sorry I am a C++ language guy - apologies for the terminologies like include headers). But no error is thrown when I build these projects with setting backend scripting to IL2CPP from the Unity Player Settings.
Can I use an IL2CPP file for deploying it in MR devices like hololens? Build configuration for MR devices would be Release, x64, Remote Device. Kindly advise.
Your answer
![](https://koobas.hobune.stream/wayback/20220612145712im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
Flip over an object (smooth transition) 3 Answers
API Compatibility Level 2 Answers
Filetype association 0 Answers