Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

[RELEASED] RemotePackageManager - AssetBundles

Discussion in 'Assets and Asset Store' started by matheuslr, Jun 7, 2014.

  1. matheuslr

    matheuslr

    Joined:
    Aug 27, 2013
    Posts:
    42


    Easily add support for AssetBundles to your game!
    No more big build sizes!


    We're using the RemotePackageManager for the customizations in our game ProjectTilt
    and we have saved almost 10mb!


    This asset makes it easy to build, load, manage version, quickly iterate and even upload AssetBundles!

    See the Demonstration Video
    You can check the Online Documentation

    Features
    - Instantiate a Prefab from the web with zero code!
    - Download packages, as easy as one line of code!
    - Build your AssetBundles with on click! *
    - Version management for caching is handled automatically (saves bandwidth)!
    - Upload to Amazon S3 with one button!
    - Upload using FTP with just one button!
    - Quickly iterate your game as you can load AssetBundles from the editor without having to build them!

    * Requires Unity Pro License for that feature.

    Have a feature request? Comments? Questions? Please, feel free to reply this thread.

    AssetStore link: https://www.assetstore.unity3d.com/en/#!/content/18115
     
  2. gshape

    gshape

    Joined:
    Aug 8, 2012
    Posts:
    104
    Hi matheusir,

    It looks cool! I am new to AssetBundles. Will the game download a package once or every time please?
    What I want to do is, the game will download all required AssetBundles at the beginning of game and cached it until new version found. Is that possible please?

    Thank you.
     
  3. matheuslr

    matheuslr

    Joined:
    Aug 27, 2013
    Posts:
    42
    Hello there!

    RemotePackageManger will download it only once. After you call the "Load" funcion for the first time, it will cache it so even if you call it again, it will take the cached version!

    Hope this helped!

    * Also, the asset is 50% off on the Asset Store right now! ;)
     
  4. shwa

    shwa

    Joined:
    Apr 9, 2012
    Posts:
    461
    Hi,
    Just bought this. Are there limits to how large a file can be cached?
    thanks,
     
  5. matheuslr

    matheuslr

    Joined:
    Aug 27, 2013
    Posts:
    42
    Hi, shwa!

    These limits are on the Unity side. There's this page on documentation that talks (more or less) about it:
    http://docs.unity3d.com/Manual/DownloadingAssetBundles.html

    It says that the Web Player cache is about 50 mb for Asset Bundles. It doesn't say much about file size limit, though. So I suppose there's no constraint.

    Hope it helps and thanks for the support!
     
  6. matheuslr

    matheuslr

    Joined:
    Aug 27, 2013
    Posts:
    42
  7. kaz2057

    kaz2057

    Joined:
    Jan 18, 2011
    Posts:
    326
    I see 1.6 update. Please add changelog :)
     
  8. matheuslr

    matheuslr

    Joined:
    Aug 27, 2013
    Posts:
    42
    You can also find it under "Assets/RemotePackageManager/Documentation/Changelog.txt"

    ---
    1.6
    ---

    Fixed old version migration not working.
    Caching improvements.
    Other small bug fixes.


    ---
    1.4
    ---

    Now it's possible to build for multiple platforms at once! (You may have to rebuild your assetbundles)
    New tutorial videos!
    Bug fixes.


    ---
    1.3
    ---

    Bug fixes.


    ---
    1.2
    ---

    Added old version migration system so it's easy to upgrade an old project.


    ---
    1.1
    ---

    Updating documentation.
    Moved "AssetBundles" folder to inside "RemotePackageManager" folder.


    ---
    1.0
    ---

    New UI
    New remote package dependency management
    Improved user workflow

    "version.txt" was substituted by "<package_name>-settings.asset" for better control over
    how each package is built.

    Also, it is no longer necessary to keep package assets inside the "AssetBundles"
    special folder. They're now linked through each package settings asset.


    ---
    0.4
    ---

    Fixed the crazy exception when FTP uploading.


    ---
    0.3
    ---

    Fixed some issues with the "version.txt" caching.
    Fixed some dumb issue with the RemotePackage that would not instantiate the remote prefab!
    The outdated packages take into account the asset dependencies.
    PackageSelector cannot be an empty string anymore.
    Added a changelog! ;D


    ---
    0.2
    ---

    Added support for FTP automatic upload


    ---
    0.1
    ---

    Initial version.
     
  9. Ony

    Ony

    Joined:
    Apr 26, 2009
    Posts:
    1,973
    I'm currently porting a game from 3.5 Pro to 4.5 Pro. The game uses roughly 100 asset bundles, and I found out in the porting process that the bundles will all need to be rebuilt for the new version of the game. That's fine, but from what I've read I will also have to continue updating them each time I make changes to the code, even tiny changes, which during development is going to be a major pain.

    Will this asset help with that? Will it prevent me from having to keep rebuilding asset bundles every time I make a small change in the code, even while just trying to test? I just want to be sure that it's what I need before I buy it.
     
  10. matheuslr

    matheuslr

    Joined:
    Aug 27, 2013
    Posts:
    42
    Hi, Ony!

    So, this asset will help you (among other things) in building and testing your game. While inside Unity, you're able to simply hit play and test the game already without having to build any asset bundle.

    When it comes to deploy the game, you'll have to build every asset bundle at least once. However, you only actually have to rebuild an asset bundle when you make changes on some of it's dependecies. For instance: if you build an asset bundle "A" containing just a texture and then make some script changes, since the texture wasn't modified, you won't need to rebuild the asset bundle "A".

    Also, please note that if you start to use RemotePackageManager in your 100 asset bundles game you'll have to setup 100 asset bundles *once*. Not that it is difficult but more of a tedious work. You can also setup them programmatically with the help of some custom script in which I can help you with, tho.

    Hope it clarifies a bit how it works. If you have any further questions, I'll be happy to reply them!

    Cheers

    Matheus
    BitCake Studio
     
  11. ddfire

    ddfire

    Joined:
    Dec 22, 2010
    Posts:
    53
    Where is the documentation?
    Like to open the panel go to...
    this field means.....
    where????
    Thanks
     
  12. matheuslr

    matheuslr

    Joined:
    Aug 27, 2013
    Posts:
    42
  13. FlolF

    FlolF

    Joined:
    Nov 20, 2012
    Posts:
    14
    Hi there!

    I've just starting looking for ways to build asset bundles in the cloud. I would like to build assetbundles from a project in batch mode on an EC2 instance on Amazon Web Services with Unity3D 5.

    I saw that your plugin provides functionality for building assetbundles depending on the project hierarchy and upload them to S3. This sounds great.

    Would it be possible to do this in batch mode?

    Best regards
     
  14. matheuslr

    matheuslr

    Joined:
    Aug 27, 2013
    Posts:
    42
    Hello, FlolF!

    Well, never tried it! However, if I'm not mistaken, it would be needed a static method as an entry point. Just so that method would call the Asset's build process.

    I'll take a look at the code to see if there's an easy way to do that. If not, I can make some changes to support that. It should be straightforward I suppose! :)
     
  15. matheuslr

    matheuslr

    Joined:
    Aug 27, 2013
    Posts:
    42
    Hey again!

    Still not sure if this is what you're looking for, but this should enable you to rebuild all of your assetbundles (just as when you click "Rebuild All" from the editor) from command line.

    Just add this script to an "Editor" folder in your project: http://pastebin.com/F3XRujAu

    Then you should call unity with this arg: "-executeMethod BatchHelper.RebuildAll"

    Please tell me if anything goes wrong or if you need further help!

    Best regards,
    Matheus
     
  16. imtrobin

    imtrobin

    Joined:
    Nov 30, 2009
    Posts:
    1,548
    the latest 2.0, I'm getting error in U5. Is it supported?
     
  17. matheuslr

    matheuslr

    Joined:
    Aug 27, 2013
    Posts:
    42
    Hey imtrobin!

    Right now, there is no support for Unity 5. However, we're working on it to make RemotePackageManager be compatible with all unity versions from 4.0.

    Best,
    Matheus
     
  18. Gaurav-Gulati

    Gaurav-Gulati

    Joined:
    Sep 22, 2014
    Posts:
    52
    Hi,
    Can we have Unity WebGl compatibility?
     
  19. matheuslr

    matheuslr

    Joined:
    Aug 27, 2013
    Posts:
    42
    Hello, Gaurav!

    At the time, it has no Unity 5 support (although it may work, we have not fully tested it). So, we kindly ask for your patience until we publish a new version Unity 5 compatible!
     
  20. jpatinop80

    jpatinop80

    Joined:
    Jul 29, 2012
    Posts:
    55
    I know there is not support for unity 5 but I got this error, how could I solve
    UnityEngine.AssetBundle.LoadAll()' is obsolete: `Method LoadAll has been deprecated. Script updater cannot update it as the loading behaviour has changed. Please use LoadAllAssets instead and check the documentation for details.'

    thanks

    Edit: I replace LoadAll for LoadAllAssets and the error fly away, but I have a new error and I think i would be more after this...: Cannot convert type `System.Collections.Generic.KeyValuePair<string,string>' to `System.Collections.DictionaryEntry'
     
  21. matheuslr

    matheuslr

    Joined:
    Aug 27, 2013
    Posts:
    42
    Hello there!

    So, yes the version on the AssetStore is not Unity 5 compatible.. *However*, a new version is ready for submission! And it contains every AssetBundle feature Unity 5 exposes us. I'm just working on some better images and videos to post it there.

    In the mean time, you can send me an email and I can reply you with the latest RemotePackageManager!

    Cheers
     
  22. matheuslr

    matheuslr

    Joined:
    Aug 27, 2013
    Posts:
    42
    Hey, people!
    I've already submitted the new version Unity 5 compatible to the AssetStore. It should be live within some days!
    Until then, here's the compact change log.

    Best,
    Matheus

    == CHANGELOG ==

    UNITY 5 SUPPORT ADDED!!
    Finally, it is now possible to use the new enhanced Asset Bundle workflow that comes with Unity5 (more info at http://docs.unity3d.com/Manual/EnhancedAssetBundle.html)
    RemotePackageManager now integrates itself on top of the new Unity5 API (fear not as Unity4 users are still able to use it the old way!)

    *IMPORTANT*
    If you are a Unity5 user, you should define/create/assign Asset Bundles through the default inspector located at the bottom ("AssetLabels").
    Then you'll be able to *assign*, *build* and *upload* them to your servers.
    Also, now it is not necessary anymore to manually set their dependencies as Unity5 should do that automagically for you ;)

    You can find more info regarding the new workflow here: http://docs.unity3d.com/Manual/BuildingAssetBundles5x.html
     
  23. matheuslr

    matheuslr

    Joined:
    Aug 27, 2013
    Posts:
    42
  24. IbsenCaldas

    IbsenCaldas

    Joined:
    Feb 7, 2014
    Posts:
    1
    Hello, I read all the comments here and at the Store, but i still got some doubts that i need to know before buy the plugin.
    First ill explain a little about my problem.
    I got an application kind like a 3d viewer, but with the 3D models, textures and all its getting big.
    Now its something like 40Mb as a mobile application. So started to search about assetbundles and i got here, what i need to know its 3 things:

    - The assetbundle is both aceptable iOS and Android?
    - There is a specif method that i call my assetbundle?
    - I can call an assetbundle that will call other assetbundles?
    - Its only Amazon and FTP, or i can use a public link from dropbox, drive ...

    Thanks a lot for your attention.
     
  25. matheuslr

    matheuslr

    Joined:
    Aug 27, 2013
    Posts:
    42
    Hello, Ibsen!

    First of all, thanks for your interest in our asset.
    So, here are the answers to your question:

    - All Unity platforms support AssetBundles. However, some of them are no compatible with each other. Thus, it is recommended that you build a version of your bundles for each platform your application is going to support. You can check this for more info (http://docs.unity3d.com/Manual/abfaq.html)

    - In order to load each of your bundles, you simply call the method:
    RemotePackageManager.Load("path/to/assetbundle").GetAndInstantiate( go => {
    // Here you have your remote prefab instantiated!
    // Be sure to check the docs to see other methods you could call.
    });

    Also, you can too instantiate a prefab inside an AssetBundle without code using the "RemotePackage" component.
    Just check the example scenes to see how easy it is to do this.


    - Not sure what you mean by this. If what you want is to download an AssetBundle after another one finished downloading, it is possible by nesting the RemotePackageManager.Load( ... ) calls.

    - Currently, the easy uploader only supports FTP and AmazonS3. However, you can always upload your files manually (you can find them at the "AssetBundles_RecentlyBuilt" folder).

    In other hand, for the AssetBundles downloading to work, you have to make sure that the public url reflects the folder struct. For instance, if the "MyPrefab.unity" AssetBundle is inside the folder "assetbundles/ios/prefabs/", the final url should be something like: http://dropbox.com/some/random/characters/assetbundles/ios/prefabs/MyPrefab.unity


    Hope it helps!

    If anything is not clear still, please do not hesitate in asking again! :)
     
  26. matheuslr

    matheuslr

    Joined:
    Aug 27, 2013
    Posts:
    42
    Hello again, cool people!

    I'm here to tell you that if you're a Level11 AssetStore person, you can get RemotePackageManager 60% off!!
    Just follow the link: http://u3d.as/7Q7 and tell your friends :)

    * But remember: it's just for this month! ;)

    Thanks again!

    Matheus
     
  27. Aston-Martin

    Aston-Martin

    Joined:
    Jul 5, 2012
    Posts:
    64
    Brought this nice asset recently. But have to manually upload to the VPS servers using sftp for different projects and sometimes mix-up the bundles due to human errors ;-)
    Would be wonderful automation, if the uploader support sftp.

    Hope to see SFTP support soon, thank you!
     
  28. matheuslr

    matheuslr

    Joined:
    Aug 27, 2013
    Posts:
    42
    Hey, Aston!

    Great to hear that you like our product! :)
    So, it seems that in order to upload using SFTP (not FTPS) we need some 3rd party library since the plain C# libraries do not support it. However, I think it may be a good thing to incude say SSH.Net if it really does a better job than plain WebRequests.

    I'll test it right here and, if we come up with a good solution, we can send you the latest version.

    Best,

    Matheus
     
    jacobgmartin likes this.
  29. khoavnm9

    khoavnm9

    Joined:
    Jun 6, 2014
    Posts:
    26
    I Click Buy Additional Licenses , nothing new , what does it mean?
    And I can not build and build APK .
     
  30. khoavnm9

    khoavnm9

    Joined:
    Jun 6, 2014
    Posts:
    26
    hhm ,click "Buy Additional Licenses" , I do not get anything , why your asset store sell for nothing ? suggest team support answer my question .
     
  31. matheuslr

    matheuslr

    Joined:
    Aug 27, 2013
    Posts:
    42
    Hello, khoavnm9!

    What do you mean by not getting anything?
    If you want to use RemotePacakgeManager on more computers, you just download it multiple times.

    If you already bought this asset, you can download it from here:
    https://www.assetstore.unity3d.com/en/#!/content/18115

    Hope it helps!

    Matheus
     
  32. crafTDev

    crafTDev

    Joined:
    Nov 5, 2008
    Posts:
    1,818
    Hello,

    So I just bought this Asset looking for a simple way to access and upload files through Cloudfront, but there is no documentation on how you do anything, just videos without sound. I put my credentials into to Upload section of the package manager but nothing uploads when I hit the button? It says "Could Not Find S3 Bucket". I can't download the bundle that i have on S3 either, gives me errors. More explanation on how to use the asset will be much appreciated. I sent an email asking about this.

    Thanks,
    jrDev
     
  33. matheuslr

    matheuslr

    Joined:
    Aug 27, 2013
    Posts:
    42
    Hello, jrDev!

    This S3 issue is because the correct URL for your S3 endpoint is different.
    Can you tell what your bucket name is?

    After you upload files to your bucket, you can get a public link to it after you "right-click" > "make public" (it should appear on the right side of the webpage). With that, you'll know what your S3 base URL is.

    Best,

    Matheus
     
  34. crafTDev

    crafTDev

    Joined:
    Nov 5, 2008
    Posts:
    1,818
    Hey,

    I sent an email. What does the URL have to do with logging in with my credentials? Isn't the URL just to download the files?

    EDIT: Nvm, had the wrong Secret Key with the Access Key.

    EDIT2: But now when trying to upload I get this error:

    "<Error><Code>SignatureDoesNotMatch</Code><Message>The request signature we calculated does not match the signature you provided. Check your key and signing."

    The iOS platform file gets uploaded but nothing else.

    Thanks,
    jrDev
     
    Last edited: Mar 22, 2016
  35. insiderrr

    insiderrr

    Joined:
    Feb 24, 2014
    Posts:
    50
    I keep getting the console error 'Recently build directory does not exist' i work with ftp upload and set everything right, any idea what is going on ?
     
    Last edited: Mar 29, 2016
  36. matheuslr

    matheuslr

    Joined:
    Aug 27, 2013
    Posts:
    42
    Hello, there!

    Did you just try to upload after you built all your bundles? Did you move any of your files after building?
    Have you changed the default recently build directory (advanced settings)?

    Do you mind sending me a screenshot of your project folder tree? This way I can help you better :)

    Cheers
     
  37. insiderrr

    insiderrr

    Joined:
    Feb 24, 2014
    Posts:
    50
    Thanks for the fast replay. i inculded a screencap, it shows the console error

    I followed the unity 5 readme file, all is well explained, but i'm missing something. I created a folder on my ftp and i'm linking to that url in Unity. for some reason it's not uploading.
     

    Attached Files:

  38. matheuslr

    matheuslr

    Joined:
    Aug 27, 2013
    Posts:
    42
    Oh, I see it now!

    The issue is that you're using "local" (StreamingAssets) bundles. It may be not very well explained, however, the "local" checkbox is used to indicate that these bundles are loaded together with the final executable (useful for Steam builds for instance). If you wish to load them remotely from your FTP, maybe you want to uncheck it! :)
     
  39. insiderrr

    insiderrr

    Joined:
    Feb 24, 2014
    Posts:
    50
    It works, just trial & error. Had some bad ftp directions :)

    ** I did some test with streaming assets, i used your test scene to find out if everything works. When i tested your ftp adress it displayed an 'on scene download error. I thought your url was old so i replaced and re-uploaded the files to my ftp. I get the same error, wondering how to fix this.
     

    Attached Files:

    Last edited: Mar 30, 2016
  40. matheuslr

    matheuslr

    Joined:
    Aug 27, 2013
    Posts:
    42
    Hey.

    Actually, if you see an FTP address there, it's just a dummy one, just for the sake of an example.

    Before uploading to your FTP, did you rebuilt everything (after you made the changes)?
    Also, you may need to put a public "crossdomain.xml" file at the root of your domain (because of Unity).
    This file looks like this:

    Code (CSharp):
    1. <?xml version="1.0"?>
    2. <cross-domain-policy>
    3. <allow-access-from domain="*"/>
    4. </cross-domain-policy>
    As seen in this Unity page: http://docs.unity3d.com/Manual/SecuritySandbox.html

    If the issue persists, you can email me your FTP link and I try downloading your bundles here.
     
  41. agamemnon-prime

    agamemnon-prime

    Joined:
    Aug 1, 2014
    Posts:
    9
    Hi,

    We just bought the package and were wondering if the loading of the assets can be skipped. I want to download the package and instantiate the contents manually.
    If I open the profiler I noticed that every asset included in a loaded package is loaded, consuming quite a bit of memory as my package contains a lot of sprites. Is there any way to prevent this?
     
  42. matheuslr

    matheuslr

    Joined:
    Aug 27, 2013
    Posts:
    42
    Hello, there.

    If you want to selectively load assets downloaded, maybe you'll be better off separating each sprite in a separate AssetBundle. We use this approach in our game where each character customization (arms, torso, legs, etc) is in a different bundle. This way, we can only download the necessary customizations for each session play.

    Hope this helps,

    Matheus
     
  43. agamemnon-prime

    agamemnon-prime

    Joined:
    Aug 1, 2014
    Posts:
    9
    Hi Matheus,

    Thx for the reply, but I altered the code and instead of doing calling LoadAllAssets (in RemotePackageManager) I only load the requested asset.
     
  44. matheuslr

    matheuslr

    Joined:
    Aug 27, 2013
    Posts:
    42
    Yep, sure! If that works for you, way to go :)
     
  45. jpatinop80

    jpatinop80

    Joined:
    Jul 29, 2012
    Posts:
    55
    Hello.. I´m working with Android and I'm having a very slow download.. file less than 2mb download normally, but if the file is up to 9mb the download is very slow and painful some time stuck on 50% or 60%....by the way on iOS works perfect!!! any suggestion? thanks
     
  46. matheuslr

    matheuslr

    Joined:
    Aug 27, 2013
    Posts:
    42
    Hey, jpatinop80.

    Can you verify if this error still occurs with the latest Unity 5.3 patch? It seems that there was an issue with the WWW class on Android.

    Thanks
     
  47. agamemnon-prime

    agamemnon-prime

    Joined:
    Aug 1, 2014
    Posts:
    9
    Hello,
    I there any way to set the BaseUri's at compile time or runtime? The BaseUri is readOnly. I would like to load the packages from a different location for my development builds.
    Thx,
    Tim
     
  48. matheuslr

    matheuslr

    Joined:
    Aug 27, 2013
    Posts:
    42
    Hello, there!

    You can easily change which BaseUri you want to use in your builds by selecting a different one before building.
    Check this screenshot out:

    Matheus
     
  49. agamemnon-prime

    agamemnon-prime

    Joined:
    Aug 1, 2014
    Posts:
    9
    I know I can do it that way, but we build using Unity cloud build and I don't want to make any changes manually. Doing it manually will mean that some day, we'll have a production build linking to the development bundles.
     
  50. matheuslr

    matheuslr

    Joined:
    Aug 27, 2013
    Posts:
    42
    Oh, got it! Well, right now there's no out-of-the-box way of doing it. You can add this snippet to the RemotePackageManager.cs script:

    Code (CSharp):
    1.  
    2.     public static int SelectedBaseUriIndex
    3.     {
    4.         get
    5.         {
    6.             RemotePackageManager manager = GetInstance( true );
    7.             return manager != null ? manager.selectedBaseUriIndex : -1;
    8.         }
    9.         set
    10.         {
    11.             RemotePackageManager manager = GetInstance( true );
    12.             if( manager != null )
    13.             {
    14.                 manager.cachedSelectedBaseUri = null;
    15.                 manager.selectedBaseUriIndex = Mathf.Clamp( value, 0, manager.baseUris.Count - 1 );
    16.             }
    17.         }
    18.     }
    Alternatively, you can wait until this new version I'm submitting is accepted in the AssetStore.

    Matheus