question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot build MLAPI WebGL project

See original GitHub issue

Describe the bug After adding MLAPI to my project, WebGL builds fail.

To Reproduce Steps to reproduce the behavior:

  1. Create a new Unity project (3D).
  2. Add the MLAPI project via the package manager (git).
  3. File->Build Settings->WebGL->Switch Platform->Build

Expected behavior Project builds successfully.

Screenshots See below.

Environment (please complete the following information):

Additional context Errors (for searchability):

Library\PackageCache\com.unity.multiplayer.mlapi@3e3aef6aa0\Runtime\Transports\UNET\RelayTransport.cs(251,74): error CS0117: 'NetworkTransport' does not contain a definition for 'QueueMessageForSending'
Library\PackageCache\com.unity.multiplayer.mlapi@3e3aef6aa0\Runtime\Transports\UNET\RelayTransport.cs(266,60): error CS0117: 'NetworkTransport' does not contain a definition for 'QueueMessageForSending'
Library\PackageCache\com.unity.multiplayer.mlapi@3e3aef6aa0\Runtime\Transports\UNET\RelayTransport.cs(271,74): error CS0117: 'NetworkTransport' does not contain a definition for 'SendQueuedMessages'
Library\PackageCache\com.unity.multiplayer.mlapi@3e3aef6aa0\Runtime\Transports\UNET\RelayTransport.cs(273,60): error CS0117: 'NetworkTransport' does not contain a definition for 'SendQueuedMessages'
Error building Player because scripts had compiler errors
Build completed with a result of 'Failed' in 1 seconds (1391 ms)
UnityEngine.GUIUtility:ProcessEvent (int,intptr)
UnityEditor.BuildPlayerWindow+BuildMethodException: 5 errors
  at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002bf] in <208995a09fe148f5a6f6c571838c154f>:0 
  at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in <208995a09fe148f5a6f6c571838c154f>:0 
UnityEngine.GUIUtility:ProcessEvent (int,intptr)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:6
  • Comments:12 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
notcatcommented, Aug 6, 2021

Hi, is there a possibility you could create a release version with this commit added only? This is a pretty important bug and I should not have to use the development branch to compile for WebGL.

0reactions
jeffreyrainycommented, Sep 19, 2022

Netcode for GameObjects building on WebGL is now possible, after https://github.com/Unity-Technologies/com.unity.netcode.gameobjects/pull/2199

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to make WebGL development builds
To work around this, click on a different platform in the Build Player window, uncheck the "Script Debugging" checkbox, and click on WebGL...
Read more >
MLAPI, Proton or Mirror for multiplayer in WEBGL? : r/Unity3D
Hey everyone, I'm working on a project that needs to support >10 players on it at a time, the docs on MLAPI seem...
Read more >
WebGL Networking
You can't use any .NET networking classes within the WebGL platform because JavaScript code doesn't have direct access to internet protocol (IP) sockets...
Read more >
Cannot build WebGL - Ask
I can build a Linux platform solution, but WebGL build always fails. I recently did a new install, but I'm using Unity 2019.4.18f1....
Read more >
Unity WebGL Game Not Working? This Should Fix it - YouTube
Your browser can't play this video. Learn more. Open App. Quickly fix any Unity web versions of your game if it is not...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found