Search Unity

Downloadable content

Discussion in 'Editor & General Support' started by knoggly, Apr 6, 2012.

  1. knoggly

    knoggly

    Joined:
    Feb 22, 2010
    Posts:
    4
    Hello,

    I very interested in the DLC capabilities of unity3d. Is the following scenario possible with unity3d on all platforms (iphone, android and webplayer)

    1) We have an basic application that needs to be installed as usual.
    2) After the player starts the application and descides for A or B we need to download scenes, models, textures, sounds AND scripts according to A or B and store them locally for later use.

    Is this possible with unity3d ?

    kind regards

    knoggly
     
  2. diablo

    diablo

    Joined:
    Jan 3, 2011
    Posts:
    736
    I believe what you're asking for can be achieved via the use of AssetBundles (for packing/retrieving assets such as scenes, models, textures, and sounds) and WWW (for downloading assemblies that you can dynamically load into a new or existing appdomain for execution). A basic example of the latter is Angry Ant's Hydra. You may even be able to do away with WWW alltogether by saving your assemblies as assets with a .bytes extension (which in theory should work) but I haven't tried that yet. Whichever approach you choose, keep in mind that AssetBundles requires Unity Pro.

    If you're using Unity Free, then I believe you have no choice but to create your own custom importer for retrieving external resources via WWW, which is not a trivial feat.
     
    Last edited: Apr 6, 2012
  3. knoggly

    knoggly

    Joined:
    Feb 22, 2010
    Posts:
    4
  4. diablo

    diablo

    Joined:
    Jan 3, 2011
    Posts:
    736
    That link contains the question "how can i put components in external dlls and store dlls in asset bundles", which is really two questions. They answered "how can i put components in external dlls" but didn't quite answer how to "store dlls in asset bundles". One answer hinted at the method I proposed, which is to save each dll as an asset with a .bytes extension and loading/executing it at runtime.

    First things first... do you have Unity Free or Unity Pro? If free, do you intend on purchasing Pro anytime soon? If not, the situation becomes dire.
     
  5. knoggly

    knoggly

    Joined:
    Feb 22, 2010
    Posts:
    4
    I'm evaluation solutions for our current product prototype which will be a commercial application, so buying the pro-version shouldn't be the main obstacle. It is far more important for us that this kind of DLC-mechanism will work reliable on all targeted platforms. Unfortunately we had several cases where in the beginning we were told everything will work fine, and in the end it failed at some small, but important point. So this is why I try to get a most specific answer as possible. We just don't have time to test 5 different platforms.

    For the second option, I think you are right, the question is nearly the same as mine, but the answers are targeting component-bundling.

    kind regards
     
  6. diablo

    diablo

    Joined:
    Jan 3, 2011
    Posts:
    736
    In that case, the answer to your question is yes, Unity (Pro) will allow you to 1) dynamically load external assets (via AssetBundles) and 2) dynamically load/execute external dll's (via WWW as proven in the Hyrdra link or via AssetBundles if you save each dll as a .bytes asset).
     
  7. knoggly

    knoggly

    Joined:
    Feb 22, 2010
    Posts:
    4
    Allright,

    thats the kind of answer I hoped to get, and even better, the answer is positive :)

    thanks

    knoggly
     
  8. Flashmangagames

    Flashmangagames

    Joined:
    Apr 11, 2014
    Posts:
    3
    Actually, using the byte function on the Parse SDK, you should be able to easily download data within your unity game.:cool:
     
unityunity