Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bug [NetCode] WebGL build can't connect to server or host

Discussion in 'Netcode for GameObjects' started by VSP4, Mar 16, 2022.

  1. VSP4

    VSP4

    Joined:
    Jun 19, 2019
    Posts:
    2
    I migrated MLAPI to NetCode.
    Stand alone version is ok. but, WebGL build occurred runtime error.
    WebGL build version can't connect to local host.
    The runtime error is KeyNotFoundException.
    upload_2022-3-16_14-46-26.png
    I checked error reason.
    ILPPMessageProvider is empty __network_message_types list.

    In WebGL build, post processing code generator not applied.
    (editor/codegen script. ILPostProcessor.)

    Test infomation.

    Unity version: 2020.3.17f1
    NetCode : 1.0.0-pre.6
    Apply commit:
    fix: Make the adapter compile on WebGL
    (https://github.com/Unity-Technologi...iles/8845c011bdc090e99279ff09a92fb99330f4809c)

    Test Code : NetCode Test project. ConnectionApproval
    (https://github.com/Unity-Technologies/com.unity.netcode.gameobjects/tree/develop/testproject)

    Transport : WebSocket Transport
    (https://github.com/Unity-Technologies/multiplayer-community-contributions/tree/main/Transports)

    Other problem: NetCode UnetTransport websocket not contain service name.
     
  2. viknesh2020

    viknesh2020

    Joined:
    Jul 19, 2016
    Posts:
    52
    Did you solve this issue? I am looking to build a webgl project with Netcode.
     
  3. VSP4

    VSP4

    Joined:
    Jun 19, 2019
    Posts:
    2