Search Unity

Feedback Question Addressable can solve these features?

Discussion in 'Addressables' started by m-mine, Aug 29, 2019.

  1. m-mine

    m-mine

    Joined:
    May 23, 2018
    Posts:
    19
    1. Apple review
    (ii) Make sure you include sufficient content in the binary for the app to function at launch.

    We need some repetitive resources in StreamingAsset and Remote
    Before the tutorial is finished, refer to StreamingAsset
    After the tutorial, download the initial resources, refer to Remote
    Because sometimes we need hot updates of resources​


    2. Download initial resources
    Maybe you can use DownloadDependenciesAsync("initial")
    For example, we need to download 1000 resources for initial
    But now DownloadDependenciesAsync or open all threads at the same time
    Note: You need to read the address of the catalog query initial label yourself.
    Then control the DownloadPool call DownloadDependenciesAsync("address") yourself?​


    3. About resource hot update
    For example, if the user has not logged in for a long time, when the user logs in, the resource version has been changed several times.
    The user's resource version is 1, but the remotede resource version is 100 when the user logs in.
    Can this be solved with Build for update content?​


    4. About resource encryption
    The current version does not seem to have an encrypted interface. Do you need to implement it yourself?
    Such as the following code​
    Code (CSharp):
    1.  
    2. Class EncryptAssetBundleResource : IAssetBundleResource
    3.     {
    4.         AssetBundle m_AssetBundle;
    5.         Public AssetBundle GetAssetBundle()
    6.         {
    7.             Return m_AssetBundle;
    8.         }
    9.         Internal async void Start(ProvideHandle provideHandle) {
    10.             Debug.Log(Thread.CurrentThread.ManagedThreadId);
    11.             Byte[] content = await Task.Run(() => GetContent(provideHandle.Location.InternalId));
    12.             Debug.Log(Thread.CurrentThread.ManagedThreadId);
    13.             m_AssetBundle = AssetBundle.LoadFromMemory(content);
    14.             Debug.Log("test");
    15.             If(m_AssetBundle == null)
    16.                 Debug.LogError("the bundle failed " + provideHandle.Location.InternalId);
    17.             provideHandle.Complete(this, m_AssetBundle != null, null);
    18.         }
    19.         Private async Task<byte[]> GetContent(string fileName) {
    20.             Debug.Log(Thread.CurrentThread.ManagedThreadId);
    21.             Byte[] content= File.ReadAllBytes(fileName);
    22.             For (int i = 0; i < 100; i++) {
    23.                 Content = (byte)(content ^ 444);
    24.             }
    25.             Return content;
    26.         }
    27.      
    28.      
    29.     }
    30.  
    31.     Public override void Provide(ProvideHandle providerInterface)
    32.     {
    33.         New SyncAssetBundleResource().Start(providerInterface);
    34.     }

    But to implement the remote version, you need to override the remote provider.


    5. No need to package AssetBundle resources

    For example, Android movie does not support AssetBundle, nor does it support memory reading. It only supports file reading.
    This kind of resource needs to write a set of programs that manage the version.
    In this case we have to control two addressable catalog versions and versions that are not assetbundle.

    6.Unity cache
    Addressable asset seems to use unity cache
    As far as I know, the performance of Caching.ready is very poor.
    For example, when 30,000 files, Caching.ready will take 1 minute.
    But it takes only 10 seconds to manage it yourself.
    Has this been improved in Addressable?
     
    Last edited: Aug 29, 2019
  2. Favo-Yang

    Favo-Yang

    Joined:
    Apr 4, 2011
    Posts:
    464
    I'm confusing with this is FAQ or just questions.;)

    For the pre-cached bundle feature - bundles ship with app build, but can update remotely. It's not supported natively, but you can follow the general direction in this thread. It's a good feature request though.
    https://forum.unity.com/threads/how...uild-for-remote-contents.713771/#post-4842257