Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Docs, tutorials, guides or best practices for Addressables?

Discussion in 'Addressables' started by leollama, Sep 13, 2018.

  1. leollama

    leollama

    Joined:
    Feb 17, 2018
    Posts:
    33
    Hi all!
    Trying to work with addressables but could use more info and help with it.
    Got the system scene and "Addressable Asset System - Getting Started (revised)"...but could use more!

    Any lights?
    Thx!
     
  2. leollama

    leollama

    Joined:
    Feb 17, 2018
    Posts:
    33
    Please, some help @unity_bill !

    I'm having trouble setting up a simple scene with a menu that loads scenes from addressables....

    I've created the menu, and the scenes, dragged the scenes to the addressables panel, now I need to set them to remote path. Right? So I export the scenes as assetbundles ?

    And after that just " Addressables.LoadScene" it?
     
  3. leollama

    leollama

    Joined:
    Feb 17, 2018
    Posts:
    33
    this looks like such great info, too bad it's in japanese:
     
  4. unity_bill

    unity_bill

    Joined:
    Apr 11, 2017
    Posts:
    1,053
    eizenhorn likes this.
  5. javierfed

    javierfed

    Joined:
    Apr 10, 2015
    Posts:
    50
    I am trying to understand the build process so I can test loading from an online server... my first step was simply to get it loading assets using the asset workflow, the app is loading and displaying content as expected... but now I am trying to build it into a bundle, and the process becomes fuzzy... there is not alot of details anywhere about how this part works. with asset bundles, I would just click a button and there would be a build and the streaming assets folder appears and I can move those around no sweat.

    with addressables though, the build doesn't look like its working, there is a tone of settings to set, of which I have no clue what does which thing, and I am floundering now. anything new other than the overview youtube videos?
     
    pierrep likes this.
  6. Rodlaiz

    Rodlaiz

    Joined:
    Jul 30, 2013
    Posts:
    38
    I know this is an old topic but I've been struggling a lot with the Addressable Assets. This is the first Tutorial that REALLY make things clear (at least to me) Hope it helps:



    The tuto it's not perfect and the guy makes a few mistakes here and there, going back and forth, but at least it works.
     
  7. javierfed

    javierfed

    Joined:
    Apr 10, 2015
    Posts:
    50
    the connection is very finicky, but I did manage to get it working, but now working on a solution utilizing the AWS services to secure the bundles, and manage user permissions, etc.
     
  8. mcbauer

    mcbauer

    Joined:
    Oct 10, 2015
    Posts:
    524
    Here is a simple guide I wrote for deploying addressables on mobile. I don't get into details like SHA1, creating accounts for firebase, etc, but the working procedure for using addressables to load in an audio file, as well as straight forward firebase checks, login and data fetching.

    https://medium.com/@mikecbauervision/unity-addressables-firebase-google-cloud-storage-632191b86b9c

    Also regarding the OP, here is the code I use for addressable scene loading


    Code (CSharp):
    1.  
    2.  
    3.     // declare the AssetRef to load
    4.     public AssetReference AssetRefLevel1;
    5.  
    6.     // called from a button
    7.     public void PlayAsyncLevel1()
    8.     {
    9.         StartCoroutine(LoadScene(AssetRefLevel1));
    10.     }
    11.  
    12.     IEnumerator LoadScene(AssetReference addressableLevel)
    13.     {
    14.         LoginManager.LoadLevel();//switch to level load screen
    15.         yield return null;
    16.  
    17.         //Begin to load the Scene you specify
    18.         AsyncOperationHandle asyncAssetLoad = Addressables.LoadSceneAsync(addressableLevel, LoadSceneMode.Single);//.Completed += SceneLoadComplete;
    19.  
    20.         //When the load is still in progress, output the Text and progress bar
    21.         while (!asyncAssetLoad.IsDone)
    22.         {
    23.             //Output the current progress
    24.             progressBar.value = asyncAssetLoad.PercentComplete;
    25.  
    26.             // Check if the load has finished
    27.             if (asyncAssetLoad.PercentComplete >= 0.9f)
    28.             {
    29.                 // hide the progress bar
    30.                 progressBar.gameObject.SetActive(false);
    31.                 // do something when completed if you want
    32.                 //asyncAssetLoad.Completed += SceneLoadComplete;
    33.             }
    34.  
    35.             yield return null;
    36.         }
    37.  
    38.  
    39.     }
     
    FlightOfOne likes this.