Editor 2020.3.30f1 bytesize Invaders WebGL target is missing classes necessary to build

BaselibNetworkParameterExtensions, BaselibNetworkParameter, etc

When I build on Windows, I have no issues resolving to these classes. As soon as I switch to WebGL build, I get this error:

Library\PackageCache\com.unity.netcode.adapter.utp@1.0.0-pre.6\Runtime\UnityTransport.cs(900,18): error CS1061: 'NetworkSettings' does not contain a definition for 'WithBaselibNetworkInterfaceParameters' and no accessible extension method 'WithBaselibNetworkInterfaceParameters' accepting a first argument of type 'NetworkSettings' could be found (are you missing a using directive or an assembly reference?)

I’ve tried a few different versions of the Unity Transport for Netcode for GameObjects versions.
No luck.

1 Like

Oh, good catch! We had fixed these errors for Unity Transport itself, but not for its adapter for NGO. I’ll get this fixed in the next release (1.0.0-pre.7). Thanks for reporting the issue.

Please note however that WebGL is not officially supported (yet) by Unity Transport. We’ll fix compilation errors so that someone can at least have the package installed in WebGL projects (e.g. if one is using different transports for WebGL and non-WebGL builds), but I wouldn’t expect Unity Transport to do anything useful when used in WebGL.

1 Like

Yeah, I’ve seen that the Unity Transport is not supposed to work. What about the websocket transport implementation though? WebGL should support that, I’d imagine, but all the things explicitly checking #if !UNITY_WEGBL and commenting out their implementation seem like it might be a hurdle to attempt to test it.

You mean the WebSocket community transport? Yes I would presume this works fine on WebGL. You should be able to install it without installing the Unity Transport adapter, though. Ultimately, Unity Transport is just one of many possible transports for NGO (albeit one with official support).

1 Like

Got it! Yeah, I figured that was likely the case. I just can’t build with these issues despite specifically targeting WebGL for a free game I wanted to make :(.

I should say, I was able to remove one of the “#if !UNITY_WEBGL” scopes and got it to build, but then there are further issues as soon as you load up the Build & Run result.

Before the NetworkManager is ever told to start a socket, Unity will get stuck on the loading bar and fail to load the game.
Creating a test project with WebGL, loads fine.
Add Netcode for Gameobjects and get it to build, doesn’t load.

Currently waiting on a resolution from the bug in this other thread: WebGL Build Won't Load

It could be the same issue, but wanted to put it on your radar as well just in case it’s not.

Ah right, I wasn’t aware there were WebGL issues with Netcode for GameObjects itself.

Still, thanks for reporting the separate issue for Unity Transport. The fix has been merged and will be in 1.0.0-pre.7.

1 Like

Was this issue solved? I can’t find com.unity.netcode.adapter.utp@1.0.0-pre.7.
I have the same error as the OP on WebGL.

Package com.unity.netcode.adapter.utp has been merged in com.unity.netcode.gameobjects as of version 1.0.0-pre.7 (current version is 1.0.0). What version of Netcode for Gameobjects are you using?