Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bug Unity editor doesn't use IP from preferences when set to "Use global settings"

Discussion in 'Unity Accelerator' started by bgrz, Mar 12, 2021.

  1. bgrz

    bgrz

    Joined:
    Mar 22, 2015
    Posts:
    59
    The following bug was tested with Unity Editor 2019.4.21f1 and 22f1:

    I've set up the Accelerator a few days ago, getting "Connection successful" in "Preferences > Cache Server (global)" pane. The "Project Settings > Editor > Cache Server" was set to "Use global settings (stored in preferences)" and the correct IP address is displayed in the read-only text field, but the editable one below it was left empty.

    I noticed in the Accelerator dashboard that all relevant metrics were still zero after few days of use (
    Data Served from cache, Time Spent Serving from cache, Time Saved by Accelerator).

    When clicking the "Check Connection" in that Project Settings pane it indeed returns "Connection failed." unless you enter that same IP from the read-only field into the editable field.

    I don't think that's the way it's intended, it'd require this IP to stored in the version control since it modifies the ProjectSettings/EditorSettings.asset and we might want to have different IP/port on different computers where this Unity project is used.
     
  2. hiepu3d

    hiepu3d

    Unity Technologies

    Joined:
    Jul 1, 2017
    Posts:
    63
    Hello,

    The metrics you see in the dashboard is only relevant if your project is set up to use Collaborate. If you create Accelerator through the dashboard and use Collaborate, the Editor would be able to connect to that Accelerator automatically and it will upload source files (relevant to Collaborate) to Accelerator. To check the metrics of the Accelerator with Assets Pipeline, you should see [Accelerator IP]/metrics instead.
     
  3. bgrz

    bgrz

    Joined:
    Mar 22, 2015
    Posts:
    59
    Yes, those are the metrics I was referring to. From the web dashboard.
     
  4. henriksc

    henriksc

    Unity Technologies

    Joined:
    Aug 27, 2020
    Posts:
    30
    The best way to check if you are connected and using the accelerator in 19.4, is to open the editor.log and look for entries like these

    RemoteAssetCache - Download - Metadata - success:true, namespace:defaultmetadata, key:fbf8b6435b2b60457b1967f1966f5b27​

    RemoteAssetCache - Upload - Artifact - success:true, namespace:defaultmetadata, key:ee8ee0b5fc38e0a53f28407807ff762e​

    If you see those, then you are using the accelerator in the project.

    There is a bug in 19.4 that the "check connection" button is showing in the Project Settings even though it hasn't been enabled. When clicking the "check connection" button there, it will try to use the value specified in the Project Settings, even though you might be using the global settings. This has been fixed 20.3.

    You can use a hostname instead of IP if that makes it better for storing in the project settings. Otherwise there are also command line overrides to specify endpoints and other options https://docs.unity3d.com/Manual/CommandLineArguments.html.