Search Unity

How to Build an Existing Project from the Command Line on Linux

Discussion in 'Linux' started by mtschellenberg, Dec 6, 2019.

  1. mtschellenberg

    mtschellenberg

    Joined:
    Dec 6, 2019
    Posts:
    1
    Hello,

    I have created a project in the Linux Unity Editor and can build that project using the Editor. How would I build the project from the command line on Linux? Sorry if this question has been asked before -- I couldn't find any relevant documentation or resources online specific to Linux.

    Unity 2019.3.0f1
    Ubuntu 16.04

    Thanks,

    Thomas
     
  2. LostLight1

    LostLight1

    Joined:
    Dec 13, 2019
    Posts:
    3
    Was Looking for the same thing still looking.
     
  3. LukaKotar

    LukaKotar

    Joined:
    Sep 25, 2011
    Posts:
    394
    You can find the Unity executable file inside of
    [install path]/[Unity version]/Editor/Unity
    . (The install path can be configured inside Unity Hub.)
    You can launch Unity by writing that file path in a terminal, and you can pass arguments as you normally would:
    [Unity install path]/[Unity version]/Editor/Unity [arguments]


    For example, you could try something like this (your paths may vary):
    Code (Linux terminal):
    1. cd '~/Documents/Unity Project'
    2. /opt/UnityHub/2019.4.1f1/Editor/Unity -quit -batchmode -projectPath "$(pwd)" -buildLinux64Player "$(pwd)/Linux Build/build-name.x86_64"
     
    Last edited: Jun 25, 2020