Unity Cloud Build call Pre-Export Method with args

I need to call Pre-Export Method from UCB with some argument. Can I do this somehow? Maybe i should use another approach?

I just need to pass specific folder path to Pre-Export Method and depending on this path make some decisions.

Is there any way to do this?

Currently, I don’t believe you can. However, there are two other options that are not that nice but will get the job done. They’re quite similar:

  1. You CAN get the name of the buildTarget if you use the version of the pre-export method which takes a BuildManifest. Then, have all of your strings hardcoded in your pre-export code with an if or case statement on the buildTargetName.

  2. You can choose the pre-export method for each build target, so have a whole bunch of different methods with the strings hardcoded, and then from each of those call the same method that does most of your logic.

  3. Just thought of this, but maybe make the buildTargetName contain the filepath (with say -s instead of /s), then parse it in your main method. Might make it more difficult to understand from the cloud build dashboard though…