UCB Demos

Hello Unity Cloud Build users!

I work in my spare time on Unity Cloud Build Demos a collection of projects which should help you getting your projects up and running in the Unity Cloud as fast as possible!

The Unity Cloud Build Demo shows how to prepare your projects to use Unity Cloud Build and gives some tips and tricks what you should avoid.

What it includes right now:
Following parts are currently included.

  • Native Library Demo
  • Manifest Demo
  • WWW Demo
  • Asset Bundle Demo

More samples will be added on demand, so let me know what you need and what makes you problems!

Supported Platforms:

The Unity Cloud Build Demo supports alls target platforms which are supported by Unity Cloud Build. Although, some projects only make sense on a specific platform such as the Native Library Demo which targets iOS.

Download:

Get the project on here (for analytic reasons the project is hosted on my page ;)):

http://www.davidberger.at/wp/#!/unity-cloud-build-demo/

Let me know what you think and leave me some feedback in this thread, and if you really like it spare me some bucks on my page! :sunglasses:

XCode Manipulation API and Post Processing

Some help topics working with post process attributes and the XCode manipulation API

Read more about the XCode manipulation API here where you can also see how to add frameworks:

https://bitbucket.org/Unity-Technologies/xcodeapi/downloads

Maybe check also:

Cheers,

-db

2 Likes

I’m trying to understand how to build asset bundles on Unity Cloud using Unity 5. First the instructions says “Open the project and change to the target platform and select the Assets/AssetBundlesDemo/Scenes/AssetBundlesDemo.unity before building.” but there is only StreamingAssetsDemo.unity in that folder. Running build AssetBundle from menu gives:

Error code

Assets included in an AssetBundle cannot be scene objects, instead place them in a prefab, then export them.
Directional light
UnityEditor.BuildPipeline:BuildAssetBundle(Object, Object[ ], String, BuildAssetBundleOptions, BuildTarget)
ExportAssetBundles:BuildBundle(String, BuildTarget) (at Assets/AssetBundlesDemo/Editor/ExportAssetBundles.cs:76)
ExportAssetBundles:ExportResources(BuildTarget, Boolean) (at Assets/AssetBundlesDemo/Editor/ExportAssetBundles.cs:56)
ExportAssetBundles:ExportAll() (at Assets/AssetBundlesDemo/Editor/ExportAssetBundles.cs:46)

What does it mean?
I guess I need a simple step-by-step how to do it.

@bjornrun
Thanks for the feedback, I’ll rename it asap. I’ll work on a detailed description soon and add a step-by-step guide soon.
I think you selected a scene and tried to export the scene via the menu, but I think it only works with the Cube prefabs. I’ll include a sample for the scene soon and might work on a sample to show how you can build an asset bundle in UCB, right now, it’s only a scene which loads Asset Bundles, but it does not build the Asset Bundles.

1 Like

If I have a scene with only the cube prefab (lots of cubes), I get:

Assets included in an AssetBundle cannot be scene objects, instead place them in a prefab, then export them.
Cube
UnityEditor.BuildPipeline:BuildAssetBundle(Object, Object[ ], String, BuildAssetBundleOptions, BuildTarget)
ExportAssetBundles:BuildBundle(String, BuildTarget) (at Assets/AssetBundlesDemo/Editor/ExportAssetBundles.cs:76)
ExportAssetBundles:ExportResources(BuildTarget, Boolean) (at Assets/AssetBundlesDemo/Editor/ExportAssetBundles.cs:62)
ExportAssetBundles:ExportResourcePC() (at Assets/AssetBundlesDemo/Editor/ExportAssetBundles.cs:16)

You better make the guide fool-proof… (but somehow I managed to build asset bundles in Unity 4)

Please also include how to setup UCB for asset bundle building.

Just select the Cubes prefab and Bundles - Build All.

2026379--131276--8439a2eff6b286ff9de1e8ac4840e0a5.gif

Ok, it was that easy. Just select an asset and build, not a scene object.
Now I want to do it on UCB. How?

At the moment building asset bundles in UCB is not supported. Unity works on ways doing supporting this in a simple way. However, if you build your asset bundles by script rather then in editor, you can build it in a post process and push it to an external location. I work on a sample to show how you can do this, but this will take a few days.

1 Like

Hi! @David-Berger Can you please elaborate on what you meant by saying this?

I’m interested in using plugins like prime31 with the Cloud Build, but I don’t know whether post build actions they require are supported on Pro tier of the Cloud Build.

@bac9-ficl
Post build attributes action work properly in all tiers. Pre export methos only work in Studio/Enterprise tiers. Per platform defined post export methods work only in Studio/Enterprise tiers, so if you want to differentiate between platforms in other tiers you need to setup the post build attributes in a way to use preprocessor defines. Does this help? :slight_smile:

I’m not sure whether the method they use is the former or the latter (I think it’s some sort of a python script modifying the XCode project, and I can’t check whether it matches the openly available examples as it’s compiled), but thanks, I’ll relay your answer to their support and see what they’ll say! :slight_smile:

Prime31 works in most of the cases properly with UCB! Prime31 use python scripts in the post method exports, but they worked for us always properly. However, some users have problems in certain situations which we currently try to get solved. Search the Cloud Build section for threads about Prime31, if you can not solve your problem, let us know in one of the threads or in a separate one!

Oh, so you can confirm that some users already tried to build projects with prime31 plugins on non studio/enterpise UCB tiers and had success with that? That’s awesome to hear, thanks!

1 Like

Hi, thanks for uploading the demo scenes! Do you already know about a solution for building assetbundes in UCB?

Glad you like them! :slight_smile:
I had no time yet to make a sample for building asset bundles. :frowning: However it’s very specific anyways. I would recommend to write a script to build the bundles as post process and once the build is done, upload the bundles to your storage e.g. Amazon S3 or whatever you prefer. :sunglasses:

Could you post a demo manifest file so I know which keys are available? this information doesn’t seem to live anywhere in the documentation.
(I can make a build that gives me this information but it’ll take more time ;))

Which keys do you refer to? As there are all keys listed in the manifest documentation Unity ID :slight_smile:

A google result for “UnityCloudBuildManifest” doesn’t find that page, because it’s behind the login I guess :slight_smile:
I rarely use site-specific search engines, but I’ll keep it in mind.

I got ios version number being taken from Cloudbuild set up, so yay and thanks :slight_smile:

I didn’t find any resources that did exactly that, so I made this gist:

1 Like

The link doesn’t work anymore. Where can I find up-to-date information on the cloud build manifest?

1 Like