Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct here to familiarize yourself with the rules and how to post constructively.

  2. Unity 2022.1 is now available as the latest Tech release.
    Dismiss Notice
  3. Improve your project's performance with our new guide on profiling in Unity.
    Dismiss Notice

Can you start a certain cloud build via editor code?

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

  1. Valorware

    Valorware

    Joined:
    Aug 25, 2016
    Posts:
    79
    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,043
    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.
     
unityunity