Search Unity

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

Question Intercepting the Build Comamnd

Discussion in 'Unity Cloud Build' started by libra34567, Nov 9, 2022.

  1. libra34567


    Apr 5, 2014
    We are using DOTS 0.51 and not yet ready to switch to DOTS 1.0exp, and we are trying to make cloud build works for dots project. We are trying to intercept the build commandline cloudbuild sends to unity and trigger a BuildPlatform.Build.

    What we tried:
    1. Intercepting the command
    2. Trigger a BuildPlatform.Build

    The issues we've met and need help about
    1. We don't know how to debug in cloud console, we searched "LTB: " in the full log and its not even there. So I don't know if the GetBatchModeCmds method actually works in cloud build. (it did work in editor tho)
    2. I wonder if it is the correct way to intercept a command in unityCloud.
    3. After I figure out how to intercept the command I guess I could figure out the rest.

    Thank you for your suggestions and helps in advanced.

    Attached Files:

  2. libra34567


    Apr 5, 2014
    Anyone? Any help would be really appreciated :)
  3. tonemcbride


    Sep 7, 2010
    I didn't want to answer this before because I don't have any specific knowledge about the DOTS system but here's a few notes from what I've used in the past:

    1) I'm happy to be proven wrong but I don't think you can manually activate the build process from within the cloud build using the config.Build() command ('s_Law)

    2) You could derive an editor class from 'IPreprocessBuildWithReport , IPostprocessBuildWithReport' and then use 'public void OnPreprocessBuild( BuildReport report )' to run some pre process commands that happen before the build starts. These might setup various project settings that you need

    3) I've also seen people run a bash 'sh' script before the build starts that can do all sorts of stuff. For example, you could have it overwrite your ProjectSettings file with one that's in a different folder or move various resources around for the build.

    4) Cloud build uses fastlane afaik which means you can do some custom build files that way too (