Open tpitman opened 2 years ago
To use WebSockets with Netcode for GameObjects it is quite a combination of specific versions and experimental packages. I created a thread about it here which you can follow. We are also working on further documentation and learning material on this topic.
This is very appreciated.
I do have one question, however.
Is this using Photon Realtime or a Unity transport? It was my understanding that Photon Realtime will work directly because it relies on a server instead of a locally hosted server.
I use Unity Transport, with no use of Photon. I am only running the editor and WebGL locally, WebGL client as a LocalClient and editor as LocalHost.
I would like to use Photon actually. Do you happen to know about the error I mentioned specifically? Does it require all the steps you mention in order to use Photon as well or just to use the Unity Websockets transport?
I don't know specifically, but I can suggest/clarify with you a few things.
I have not gone through your steps yet. I will be doing that later. I am sure I am probably using the release versions of everything.
I will try your steps later and report back whether it fixes the error or not. I was just wondering if that specific error meant anything to you.
I would like to create a multiplayer game using Netcode for GameObjects on WebGL.
I understand that the built in transports are not supported.
At the home page for netcode it says there are 3rd party transports that should work.
I am using Unity 2021.3 and tried to install the Netcode package version 1.0.2.
If I have the build settings targeted to WebGL I get the following error:
(0,0): error System.TypeLoadException: Could not load type 'Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle' from assembly 'UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'
If I change it back to Windows, Mac, Linux the error goes away.
I am developing on a M1 MacBook Pro.
I also installed the Photon Realtime transport package from the git URL, but the error remains.