I am trying to build a 3d unity project only from the command line, without a static assembly pipeline method.
My attempts fail, unity complains about the "wrong path to the script." Can I set the scene path from the command line?
"C:\Program Files\Unity\Editor\Unity.exe" -batchmode -nographics -quit -projectPath "C:\unity-project" -buildWindowsPlayer "C:\unity-project\test.exe" "C:\unity-project\Assets\Scene_01.unity"
Gives an error:
Aborting batchmode due to failure: '' is an incorrect path for a scene file. BuildPlayer expects paths relative to the project folder.
I get the same error if I change the directory to the project path and use Assets\Scene_01.unity , and many variations of this.
EDIT Values ββtried for scene
Scene_01.unity
./Scene_01.unity
.\Scene_01.unity
Assets/Scene_01.unity
Assets\Scene_01.unity
./Assets/Scene_01.unity
.\Assets\Scene_01.unity
/Assets/Scene_01.unity
\Assets\Scene_01.unity
Note that there is no where I could find if he could say that you can specify the scene on the command line. I feel that unity does not want me to do this.
source share