itisnajim / SocketIOUnity

A Wrapper for socket.io-client-csharp to work with Unity.
MIT License
379 stars 65 forks source link

errors just after adding the package from git #81

Closed MohammadSyria closed 5 months ago

MohammadSyria commented 5 months ago

### Hi , thanks for the great work . we were waiting for a supporting socket.io v2/v3/v4, in Unity long time a go . But just after adding the package from the git url i got a lot of errors . I have no idea what cusec them . Any help please ? Or please just help me to install the library manually . here some of this problems .

Assets\Runtime\SocketIOClient\EventHandlers.cs(3,19): error CS0234: The type or namespace name 'Json' does not exist in the namespace 'System.Text' (are you missing an assembly reference?)

Assets\Runtime\SocketIOClient\JsonSerializer\ByteArrayConverter.cs(3,19): error CS0234: The type or namespace name 'Json' does not exist in the namespace 'System.Text' (are you missing an assembly reference?)

Assets\Runtime\SocketIOClient\Messages\BinaryMessage.cs(4,19): error CS0234: The type or namespace name 'Json' does not exist in the namespace 'System.Text' (are you missing an assembly reference?)

Assets\Runtime\SocketIOClient\JsonSerializer\ByteArrayConverter.cs(8,32): error CS0246: The type or namespace name 'JsonConverter<>' could not be found (are you missing a using directive or an assembly reference?)

and 44 more error .

UPDATE

The Error

the problem was that for some reason Unity in not supporting System.Text.Json .

The Solution

Just add System.Text.Json from Nuget to Unity