Search Unity

Unity5. How to build asset bundles and player with dependencies?

Discussion in 'General Discussion' started by HenTeMon, Aug 25, 2016.

  1. HenTeMon

    HenTeMon

    Joined:
    Apr 4, 2014
    Posts:
    4
    Hi guys!
    Is someone faced with a new bundles system in unity5?
    There is bundle, that containing in the atlas.
    There is prefab, that use the atlas.
    Prefab is located in the main project.
    Is it possible to make the atlas containing only in the bundle, but not in main project?

    Early I used to do so

    Code (CSharp):
    1. BuildPipeline.PushAssetDependencies();
    2. {
    3.     BuildPipeline.BuildAssetBundle();
    4.  
    5.     BuildPipeline.PushAssetDependencies();
    6.     {
    7.         BuildPipeline.BuildPlayer();
    8.     }
    9.     BuildPipeline.PopAssetDependencies();
    10. }
    11. BuildPipeline.PopAssetDependencies();
    But PushAssetDependencies is now obsolete...

    Thanks
     
  2. superpig

    superpig

    Drink more water! Unity Technologies

    Joined:
    Jan 16, 2011
    Posts:
    4,657
    I think you'll need to make the prefab be in a bundle too.
     
  3. HenTeMon

    HenTeMon

    Joined:
    Apr 4, 2014
    Posts:
    4
    Prefab is linken with different assets, not only with assets in bundle.
    So I don't want to much restructure the project.