O'Reilly logo

Unity 5 for Android Essentials by Valera Cogut

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Downloading new code and data in real time for Android devices

In the event of retrieving assets from your bundles, you can use three separate functions:

  • AssetBundle.Load: This will load one object only by the given name; also it will block the main thread.
  • AssetBundle.LoadAsync: This will load one object only by a given name; it will not block the main thread. Use this method for huge assets.
  • AssetBundle.LoadAll: This will load every object from your AssetBundle.

Use the AssetBundle.Unload method in the event of unloading assets. Let's look at a simple usage example of the asynchronous method as shown in the following code without any exception handling and any checks (just as skeleton):

using UnityEngine; using System.Collections; public class GetAssetBundleAsync ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required