Search Unity

Enabling Autoconnect profiler + Script Debugging?

Discussion in 'Unity Build Automation' started by distastee, Jul 9, 2019.

  1. distastee

    distastee

    Joined:
    Mar 25, 2014
    Posts:
    66
    Hey folks,
    Sadly been unable to find this info - how on earth do I enable autoconnect profiler and script debugging in Unity Cloud Build? I'd like to set up a specific build target that enables just these options.

    Thanks for any help!
    -Chris
     
    y_fujita likes this.
  2. victorw

    victorw

    Joined:
    Sep 14, 2016
    Posts:
    459
    For debugging, you can just make your build a Development build in the advanced options.

    As far as I know, autoconnecting profiler isn't officially supported by UCB but it should be simple enough to enable by adding a Pre-Export Method which sets
    EditorUserBuildSettings.connectProfiler
    to true.
     
    developer_plus and distastee like this.
  3. distastee

    distastee

    Joined:
    Mar 25, 2014
    Posts:
    66
    Perfect! That'll work. Thanks for the quick answer
     
  4. distastee

    distastee

    Joined:
    Mar 25, 2014
    Posts:
    66
    Hey @victorw - Ended up trying this. Unfortunately it seems that cloud build doesn't have access to UnityEditor during pre-export. Unsure if I should be surprised by this or not (holistically it makes sense - but practically its a huge kick in the nuts):

    error CS0103: The name 'EditorUserBuildSettings' does not exist in the current context

    I'm hoping you have some further guidance ---
     
  5. victorw

    victorw

    Joined:
    Sep 14, 2016
    Posts:
    459
  6. distastee

    distastee

    Joined:
    Mar 25, 2014
    Posts:
    66
    Nothing like some good public humiliation.

    Yep. That worked. So simple. Appreciate the help!
     
  7. Master_Zen

    Master_Zen

    Joined:
    Apr 2, 2017
    Posts:
    20
    The documentation says:
    When using CB to build the apk the ip of the CB Server is baked into the build, or am i missing something. If that's the case, what is achieved by this pre export method?
     
    zsmays likes this.
  8. zsmays

    zsmays

    Joined:
    Sep 7, 2020
    Posts:
    2
    I have a similar issue where I am trying to profile a webgl build that is built in ci/cd rather than locally - from what I can tell I won't be able to do this since it tries to connect to the ip of the build server rather than my local machine.