Is there any option to run unity in batchmode with command line to enable usage of new accelerator remote server? Something like “-CacheServerIPAddress host:port” for old one.
Yes, there definitely is. I apologize that we have not updated our official documentation to reflect this (it’s in progress). For the time being, here’s the relevant info on using the Accelerator in an automated build system (CI/CD) or otherwise scripted fashion…
Command line overrides
In some cases, like CI, it will be useful to force certain cache server settings from scripts. For this, Unity supports these command line arguments.
-
-cacheServerEndpoint string
-
Set the endpoint address for the cache server. Example:
-
-
cacheServerEndpoint 127.0.0.1:10080
-
-cacheServerNamespacePrefix string
-
Set the namespace prefix. Used to group data together on the cache server. Example:
-
-cacheServerNamespacePrefix MyProject
-
-cacheServerEnableDownload bool
-
Enable downloading from cache server. Example:
-
-cacheServerEnableDownload true
-
-cacheServerEnableUpload bool
-
Enable uploading to cache server.
-
-cacheServerEnableUpload false
When using these command line arguments, the global or project specific equivalent setting ignored.
Enabling Cache Server from the command line
If cache server hasn’t been enabled from the settings (either global or project specific). Then it’s possible to use these command line switches to force enable cache server.
-adb2 -enableCacheServer
This will also ignore any settings that would disable it.
@alexvector uncovered a bug in 2019.3 regarding use of the -cacheServerNamespacePrefix, in that the editor will only use the value set in the Project Settings. It has been fixed in 2020.1 and the team is evaluating if it can be backported to 2019.3 (or possibly the 2019 LTS release).
The 2019.4 docs says that -EnableCacheServer is the name of the command line argument, but that does not seem to work. Is that a documentation bug (should it not start with a capital E?)
I tried -EnableCacheServer and -enableCacheServer and neither had any effect. I have no idea what -adb2 means, but that fixed the problem. So, my final command-line arguments list is:
(That’s not the real IP address I’m using, fyi.) I can verify that the assets are being downloaded from my Accelerator server with that command-line.
I wasted a couple of hours on this, because of the poor documentation. bradunity’s posts were super-useful; these posts should be integrated into the official documentation.