Search Unity

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

Bug Unity Hub CLI Bug/Feature Request: Have a truly headless mode option(s)

Discussion in 'Unity Hub' started by EgillAntonsson-MagInteractive, Jul 19, 2021.

  1. EgillAntonsson-MagInteractive


    Mar 24, 2020
    Unity Hub CLI is not truly headless as command execution can in some cases prompt GUI popup.
    for example:
    ./Unity Hub -- --headless editors -r
    can prompt GUI prompt popup
    The last time you opened Unity Hub, it unexpectedly quit,
    which will cause the execution to hang.
    This currently occurs for circa half of the command execution on the CI machine
    (I've submitted a separate bug report for this bug via the 'Unity Hub Bug Reporter').

    I've automated installing Unity Editor versions on the CI machine via scheduled Jenkins job that runs shell script commands,
    that executes Unity Hub CLI commands
    (many projects use different Unity Editor versions and update the Editor / version when deemed proper,
    and the CI machine builds all the projects frequently).
    But due to the issue case described above, we can't fully automate this and a person needs to monitor this job and access the CI machine to close the popup (when it popus) to get a successful execution,
    which is very suboptimal.

    The improvement should be that no manual human interaction to GUI should be needed
    in any case for Unity Hub command executions to complete.

    Using Unity Hub version 2.4.4

    A suggested solution:
    a) Make current CLI executions truly headless
    b) add a CLI option / argument to make CLI execution truly headless,
    it could be similar to what the Unity Editor CLI ('-batchmode' and/or '-nographics')

    Attached Files:

    Last edited: Jul 20, 2021
    bdovaz and timvanazon like this.