0

I want to add Websocket-sharp.dll on C# vscode for godot, sorry im new to godot. I need to reference the Websocket to jsnode server for use in my code.

  • 1
    You should be able to add it via NuGet. Godot makes a C# project and solution that works like any other, see [How do I add assembly references in Visual Studio Code?](https://stackoverflow.com/questions/42000798/how-do-i-add-assembly-references-in-visual-studio-code). See also: [VSCode c# add reference to custom assembly](https://stackoverflow.com/questions/41381064/vscode-c-sharp-add-reference-to-custom-assembly). By the way Godot includes a WebSocket solution, see [WebSocket](https://docs.godotengine.org/en/stable/tutorials/networking/websocket.html). – Theraot May 13 '21 at 22:45
  • but is work on vscode and other question is work to compile in godot, i not need add the reference on godot? is similar to Unity? – Rubén ramirez May 13 '21 at 22:58
  • I see the post but is not use websocket on c# – Rubén ramirez May 13 '21 at 23:00
  • 1
    Godot IDE integration with .NET and C# is undeveloped. Which is bad in the sense that you don't get any means to add references via Godot. Yet, it is also good, in that it works much closer to a regular .NET C# project than you would expect (e.g. compared to Unity). You just need an external editor (e.g. Visual Studio Code) to use properly (because again, the integration with the Godot IDE is underdeveloped). In fact, Godot is ahead of Unity when it comes to .NET compatibility. – Theraot May 13 '21 at 23:09
  • 1
    About the article [WebSocket](https://docs.godotengine.org/en/stable/tutorials/networking/websocket.html). Don't let the fact that the examples are in GDScript stop you. Almost all the GDScript API is available to C# (notable exceptions are: Converting between dictionaries and objects, which is rarely used. And `yield`, use `async/await` instead). See [C# API differences to GDScript](https://docs.godotengine.org/en/stable/getting_started/scripting/c_sharp/c_sharp_differences.html). You should be able to translate GDScript examples to C# with little effort. – Theraot May 13 '21 at 23:13
  • Thank very much.. so can compile my game directly.. ok and i can translate gdscript but is work on websocket? i test if it works (: – Rubén ramirez May 13 '21 at 23:29

0 Answers0