Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

UCB Demos

Discussion in 'Unity Build Automation' started by David-Berger, Mar 4, 2015.

  1. David-Berger

    David-Berger

    Unity Technologies

    Joined:
    Jul 16, 2014
    Posts:
    743
    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! :cool:

    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
     
    adamhill and somed0nkus like this.
  2. bjornrun

    bjornrun

    Joined:
    Oct 29, 2013
    Posts:
    88
    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:

    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.
     
  3. David-Berger

    David-Berger

    Unity Technologies

    Joined:
    Jul 16, 2014
    Posts:
    743
    @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.
     
    bjornrun likes this.
  4. bjornrun

    bjornrun

    Joined:
    Oct 29, 2013
    Posts:
    88
    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.
     
  5. David-Berger

    David-Berger

    Unity Technologies

    Joined:
    Jul 16, 2014
    Posts:
    743
    Just select the Cubes prefab and Bundles - Build All.

    8439a2eff6b286ff9de1e8ac4840e0a5.gif
     
    Last edited: Mar 19, 2015
  6. bjornrun

    bjornrun

    Joined:
    Oct 29, 2013
    Posts:
    88
    Ok, it was that easy. Just select an asset and build, not a scene object.
    Now I want to do it on UCB. How?
     
  7. David-Berger

    David-Berger

    Unity Technologies

    Joined:
    Jul 16, 2014
    Posts:
    743
    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.
     
    bjornrun likes this.
  8. bac9-flcl

    bac9-flcl

    Joined:
    Dec 5, 2012
    Posts:
    829
    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.
     
  9. David-Berger

    David-Berger

    Unity Technologies

    Joined:
    Jul 16, 2014
    Posts:
    743
    @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? :)
     
  10. bac9-flcl

    bac9-flcl

    Joined:
    Dec 5, 2012
    Posts:
    829
    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! :)
     
  11. David-Berger

    David-Berger

    Unity Technologies

    Joined:
    Jul 16, 2014
    Posts:
    743
    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!
     
  12. bac9-flcl

    bac9-flcl

    Joined:
    Dec 5, 2012
    Posts:
    829
    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!
     
    David-Berger likes this.
  13. FlolF

    FlolF

    Joined:
    Nov 20, 2012
    Posts:
    14
    Hi, thanks for uploading the demo scenes! Do you already know about a solution for building assetbundes in UCB?
     
  14. David-Berger

    David-Berger

    Unity Technologies

    Joined:
    Jul 16, 2014
    Posts:
    743
    Glad you like them! :)
    I had no time yet to make a sample for building asset bundles. :( 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. :cool:
     
  15. joonturbo

    joonturbo

    Joined:
    Jun 24, 2013
    Posts:
    77
    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 ;))
     
  16. David-Berger

    David-Berger

    Unity Technologies

    Joined:
    Jul 16, 2014
    Posts:
    743
  17. joonturbo

    joonturbo

    Joined:
    Jun 24, 2013
    Posts:
    77
    A google result for "UnityCloudBuildManifest" doesn't find that page, because it's behind the login I guess :)
    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 :)

    I didn't find any resources that did exactly that, so I made this gist:
    https://gist.github.com/joonjoonjoon/ebe335dc842399f0652a
     
    David-Berger likes this.
  18. julienkay

    julienkay

    Joined:
    Nov 12, 2013
    Posts:
    167
    a436t4ataf likes this.