Search Unity

Can you start a certain cloud build via editor code?

Discussion in 'Unity Build Automation' started by Valorware, Apr 29, 2020.

  1. Valorware

    Valorware

    Joined:
    Aug 25, 2016
    Posts:
    91
    Hi,

    It'd be great to create a MenuItem function that would start a certain Cloud Build target by code, is that possible? Something like;

    Code (csharp):
    1.  
    2. CloudBuild.Build("targetName");
    3.  
    Thank you
     
  2. tonemcbride

    tonemcbride

    Joined:
    Sep 7, 2010
    Posts:
    1,089
    You can start cloud builds directly from the editor, if you go to the 'Services->Cloud Build' menu you should be able to see that:
    upload_2020-4-30_10-53-46.png

    Alternatively you can access the cloud build API directly and start it that way. I wrote some documentation on doing that from PHP a while ago so you could do something similar in C# too (https://forum.unity.com/threads/guide-creating-a-cloud-build-bot-in-microsoft-teams.663301/).

    I can't see any direct API to access the editor functionality itself but maybe someone else might know about that.