Multiple Build Configurations

Hi,

So I tested Cloud Build for one of my compagny project, and it’s pretty awesome !
Nice job guys.

I have another project, that works a little differently.
The unity project is the core framework, and when I want to build a specific application for one of our client I do this:

  • I open the MasterScene
  • I choose one of the several specific application definition that is represented by a ScriptableObject in the project
  • I click “Setup Infos”
  • It setup the bundle, app name, icon, and scripting define symbols.
  • And it put additionnals informations in a Monobehavior living in the MasterScene

How can I automate this when I create a target in the Cloud Build ?

I know there is pre-export method, but you can’t add any parameters to it…

Thanks !

There are a couple of options here:

If you are just trying to automate that process for already created “sub-projects” within the main project, you can just create a pre-export method for each of these sub-projects that performs those steps listed. Cloud build supports a different pre-export method per build target, as well as different scripting defines, bundle id, etc.

If you are saying you want to automate the creation of NEW sub-projects (build targets) that all use the same pre-export method to perform this automation, that’s where I would probably need more info on what kind of parameters you think are missing. One option is to load the Build Manifest at build time and use the info there to decide how to set up the project.

Thanks for the reply,

It will be more about the 2nd options I guess.

The thing is, at one time the engine will be mostly finished, but we’re going to make new application with it.
And in the best of world, I don’t wan’t to add a new function specific for a build and commit to the repo.
The idea will be that the Project Manager, go in the cloud, and setup a new build with the needed parameters.

It would be greate to have some custom parameters,
Send to the pre-export method ? Or maybe in the manifest ?
Think maybe as string[ ] params for a command line tool

Am I clear ?
Oh, and one more question :
- During the build does Unity really open the scene ? if yes, before or after pre-export ?
Because like I said before, I need to modify a Monobehaviour in the scene and save it before build
[EDIT]
I remember a blog post about custom build settings and inheritance, is it something that the cloud will maybe add ?
http://blogs.unity3d.com/2014/10/02/in-the-labs-custom-build-configurations/

By the way, I will be happy to have a chat if you need more info

I think most of this is already covered by just creating a new project in cloud build that points to exact same repo - bundleid, app name, scene list, and scripting define symbols can already be configured through the website. The main question is what kind of information you need to add in the Monobehaviour living the master scene. If this is confidential info, you can PM me directly and we can discuss.

And as for your question about opening the scene - cloud build doesn’t open the scene files by default, but it’s something you can easily script in your pre-export method. Since it’s running in the editor, you should probably use EditorApplication.OpenScene() to open and modify the scene as necessary.

Yes you are right.

I’m setting some strings and bools on the Monobehaviour, I download the App Icon from our server too.

But I have no way to send those strings and bools to the cloud.

I think it could be usefull to have a custom params field that is written in the manifest

We’ve discussed something like this in the past but don’t really have any concrete plans to implement anything related to this anytime soon. Don’t really have a good solution for you at the moment other than checking some configuration data into your repo when you want to create a new sub-project (which it sounds like you are trying to avoid).