Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  3. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Resolved Build with commandline?

Discussion in 'Project Tiny' started by ScriptsEngineer, Nov 14, 2020.

  1. ScriptsEngineer

    ScriptsEngineer

    Joined:
    Jun 8, 2018
    Posts:
    37
    Ok, no vscode now, but if exist command line build? example
    dotnet run -p .\Assets\Scripts\Tiny3D.gen.csproj
     
  2. AbdulAlgharbi

    AbdulAlgharbi

    Unity Technologies

    Joined:
    Jul 27, 2018
    Posts:
    319
    Nope that won't work because you still need the editor to run the conversion systems and export the scene data
    You need to build through the editor via buildconfig assets
    I recommend doing something like:

    1- create a script call it MyRunner

    Code (CSharp):
    1.  
    2. class MyRunner{
    3.  
    4. static void MyMethod(){
    5. var bc = AssetDatabase.LoadAssetAtPath<BuildConfiguration>("build_config_path");
    6. var result = bc.Build(); //This will build your game
    7. }
    8.  
    9. }
    2- Call this from the command line
    Unity.exe -batchmode -quit -nographics -project MyProject -executeMethod MyRunner.MyMethod
     
    Last edited: Nov 16, 2020
    ScriptsEngineer likes this.