itisnajim / SocketIOUnity

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

Not working with IL2CPP build on android #26

Closed Awais6 closed 1 year ago

Awais6 commented 2 years ago

It's not working with IL2CPP build on Android, working fine with Mono build, but we can't use Mono because Unity doesn't support Arm64 build with Mono.

cheneliezer commented 2 years ago

doesnt work for me on android at all. it connects but cant emit anything

wout-junius commented 2 years ago

So i am having the same issue, it will not build throwing this error : Mono.Linker.MarkException: Error processing method: 'System.Void System.Text.Json.Nodes.JsonArray::Add(T)' in assembly: 'System.Text.Json.dll'

itisnajim commented 2 years ago

don't build with Mono, use IL2CPP instead; people managed to make it work with Android, always see the older issues to know: https://github.com/itisnajim/SocketIOUnity/issues/19 https://github.com/itisnajim/SocketIOUnity/issues/16 https://github.com/itisnajim/SocketIOUnity/issues/12 https://github.com/itisnajim/SocketIOUnity/issues/5

Pathawut commented 2 years ago

Are there another way to fix this issue without change back to 4.0.0? because it's working server I can't change it.

itisnajim commented 2 years ago

4.2.0 working too

More info please.

Pathawut commented 2 years ago

I working on 4.4.0 and It doesn't work on IL2CPP Build. when I use socket.connect() , It doesn't have any reply message back. It keep try to attempt reconnect over and over. but It work perfectly in Editor.

kimminsu-123 commented 2 years ago

had any solutions?

Awais6 commented 2 years ago

I working on 4.4.0 and It doesn't work on IL2CPP Build. when I use socket.connect() , It doesn't have any reply message back. It keep try to attempt reconnect over and over. but It work perfectly in Editor.

Exactly same happens with me

Awais6 commented 2 years ago

had any solutions?

I have moved to the best HTTP 2 asset available on the asset store, working perfectly

kimminsu-123 commented 2 years ago

had any solutions?

I have moved to the best HTTP 2 asset available on the asset store, working perfectly

https://assetstore.unity.com/packages/tools/network/best-http-2-155981

this link?

kimminsu-123 commented 2 years ago

Open build settings and replace IL2CPP Code Generation with Fast (smaller) builds. it works

Pathawut commented 2 years ago

Open build settings and replace IL2CPP Code Generation with Fast (smaller) builds. it works

It's work. Thank you very much.

Kouznetsov commented 1 year ago

Open build settings and replace IL2CPP Code Generation with Fast (smaller) builds. it works

It does, but why?

itisnajim commented 1 year ago

IL2CPP

https://forum.unity.com/threads/il2cpp-build-time-improvements-seeking-feedback.1064135/