I am working on a project I would like to put into the cloud build system. My problem though is that it uses its own custom build script.
My targets are IOS and Webbuild, and in the future WebGL.
The web build use assetbundles so I will need some way of creating these.
I know people have been talking about you can write post and pre scripts to be run in conjunction with the build process, but I can find no examples of this as well as the debugging process of building such a script.
Ideally I would have the buildprocess make all my assetbundles and upload them via FTP to our staging server.
Yes, that’s totally possible. I would suggest to use post process attributes to upload a single file to your server. You can use a node.js local server or something similar to output any logs related to connection with your webserver if you can not monitor the remote location. Once the single file upload works, it should be possible to trigger the Asset Bundle build pipeline and upload the finished files afterwards
Thanx for your answer. I have now played around with the [PostProcessBuild] flag and I can run code after build.
Two questions arise though.
Does there exist a hook for running before, where I can react to what platform is being built for. I have a build for IOS where all scenes are included and a build for web where scenes are put in assetbundles.
How do I communicate with the outside world? I have tried creating a www object but I cant use a yield as it happens in Editor script.
1.) There is a pre-process build method too, it’s available in the Studio Plan. But you can preprocessor defines to use different commands on different platforms, it that’s what you need.
2.) You should be able to reach your server from within your pre/post C# methods. Could you maybe post your code so we can help to improve it?
You can create custom scene lists in the studio tier, but it might be possible via scripts in lower tiers too.
About the code, how do you upload those files? Does the server receive files? Have you already tried by uploading a simple text files or image before sending binary data? I would assume the ContinuationManager is comparable to this? Because if yielding is a problem it should also work with subroutines, I did not encounter problems with yielding there in editor scripts afaik.