Search Unity

Bug Editor doesn't use accelerator if only enabled via command line

Discussion in 'Unity Accelerator' started by liortal, May 10, 2021.

  1. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,562
    Our automated build process is invoking Unity from the command line (in batch mode).
    I wanted to update our build pipeline to also use the Unity accelerator, as such i appended the following command line options to our build:

    -EnableCacheServer -cacheServerEndpoint host:ip

    This did not work! i am wondering if it should work ? what am i doing wrong?
    Only when i enabled the cache server from Project Settings, it started working.

    I was under the impression that the CLI options override anything that is set in the editor ? please let me know if this is a real bug or expected behaviour.
     
  2. henriksc

    henriksc

    Unity Technologies

    Joined:
    Aug 27, 2020
    Posts:
    30
    Hi

    What version of Unity are you using? And could you provide an editor.log file from a build run?

    It might be that you would need to add '-adb2' to the set of command line arguments. And yes, the CLI options are there to override the cacheserver project settings, so they should definitely be working.
     
  3. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,562
    We are using Unity 2019.4.22. I can provide an editor log, sure (do you need the whole thing ?)
     
  4. henriksc

    henriksc

    Unity Technologies

    Joined:
    Aug 27, 2020
    Posts:
    30
    Ah, ok, then you need `-adb2` flag as well. Reason being that the 19.4 release still has the old asset pipeline v1 available, so some of the logic checks for that flag. For version 20.1 and up, it's not needed.

    If you still have issues after adding the flag, then sharing an editor.log should enable us to figure out why it's not working for you.
     
    E_3 and liortal like this.
  5. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,562
    @henriksc good to know. i will try that. AssetDatabase v2 is set in our project settings from what i remember.
    Also, worthwhile to note that in the docs, in case it's not there (i didn't see it, but now i am not 100% sure i looked at the 2019.4 docs)
     
  6. Whatever560

    Whatever560

    Joined:
    Jan 5, 2016
    Posts:
    519
    On my jenkins with 2019.4.21f the -adb2 flag did it, a bit hard to troubleshout as unity log is silent if connection is not performed.
    Code (CSharp):
    1.  
    2. RemoteAssetCache - connected - 192.168.1.10:10080
    3.  
    My args :
    -adb2 -EnableCacheServer -cacheServerEndpoint 192.168.1.10:10080 -cacheServerEnableUpload false -cacheServerEnableDownload true