Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Question How can I use the Unity Profiler with WebGL builds?

Discussion in 'WebGL' started by devluz, Nov 5, 2022.

  1. devluz

    devluz

    Joined:
    Aug 20, 2014
    Posts:
    61
    When I try any Unity 2021.3.12f1 WebGL project with Autoconnect Profiler ticked the profiler opens after the build but doesn't show anything. In firefox I just get the following:

    Firefox can’t establish a connection to the server at ws://192.168.1.3:54998/.
    Connection 1 is no longer valid. Calling auto disconnect.

    This repeats over and over again. I checked the open ports and the Unity Editor the port 54998 is not in use.

    Is there any other steps I have to take to get this working?

    I did find a bug report but it is marked as fixed.
    I did also try with a random 2020LTS and 2019LTS and they all seem to have the same issue.

    Does it work for anyone else?
     
  2. G_Wojo

    G_Wojo

    Unity Technologies

    Joined:
    Feb 8, 2017
    Posts:
    32
    Hi, could you try 2021.3.13f when it will be out? We backported a lot of improvements for dev connectivity in the engine. They should help with stability but also adding a lot of additional logs for tracking issues that were not resolved by it.

    For now, do you know if you are able to use auto connection when running desktop player build?
     
  3. devluz

    devluz

    Joined:
    Aug 20, 2014
    Posts:
    61
    I will try it once it is ready!

    Edit: Windows Player and Android do work with Unity 2021.3.13f1 but WebGL still does not work. The WebGL player and Unity Editor do not connect. It does work on my Mac with the same unity version though so I have at least a workaround

    So Windows Editor with 2021.3.13f1 to Windows Player, Android works. WebGL fails
    Mac Editor with 2021.3.13f1 to WebGL does work
     
    Last edited: Nov 12, 2022
  4. unityruba

    unityruba

    Unity Technologies

    Joined:
    Nov 6, 2020
    Posts:
    136
    @devluz That's weird because I just tested it with 2021.3.13f1 on my Windows machine and it connected to the WebGL application. If you can open a bug report with a repro project that'll help us figure out what's happening.