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
  4. Dismiss Notice

Question Addressable didn't work in android build.

Discussion in 'Addressables' started by fatinsyaz, Oct 10, 2023.

  1. fatinsyaz

    fatinsyaz

    Joined:
    Oct 4, 2023
    Posts:
    8
    Why my addressable didn't work in android build but work in editor using Unity 2023? The content already stored remotely on a server. I have followed the tutorial to set the value "Do not build addressable on player build" under player build settings but still didn't work on android.
     
  2. DeathPro

    DeathPro

    Joined:
    Jul 28, 2018
    Posts:
    71


    What errors did you get in the build? Did you set the Addressable Profile accordingly?
     
  3. fatinsyaz

    fatinsyaz

    Joined:
    Oct 4, 2023
    Posts:
    8
    The addressable scene are not change when press the button. But in editor it perfectly go to each scene.
     
  4. DeathPro

    DeathPro

    Joined:
    Jul 28, 2018
    Posts:
    71
    Can you see any console logs on Android Build when you press the "Change Scene" button? If you can not see console logs in Android Build, you can use this asset for free.
     
  5. fatinsyaz

    fatinsyaz

    Joined:
    Oct 4, 2023
    Posts:
    8
    No error in console but still cannot load the scene in android. Screenshot 2023-10-12 144424.png
     
  6. DeathPro

    DeathPro

    Joined:
    Jul 28, 2018
    Posts:
    71
    You need to look at the Console Logs in Android Build. Not in the editor...
     
  7. fatinsyaz

    fatinsyaz

    Joined:
    Oct 4, 2023
    Posts:
    8
    I used Android logcat to see console logs in Android build. This is the error shown: Android Logs.png

    This is exe build:
    EXE.png

    But I don't really understand what is the errors. There is so many error in async operation. Can you assists me to solve this problem? The scene can be load in the editor but cannot in android and exe build.
     
  8. fatinsyaz

    fatinsyaz

    Joined:
    Oct 4, 2023
    Posts:
    8
    I followed this tutorial
     
  9. DeathPro

    DeathPro

    Joined:
    Jul 28, 2018
    Posts:
    71
    What does your "Remote Load Path" look like?
     
  10. fatinsyaz

    fatinsyaz

    Joined:
    Oct 4, 2023
    Posts:
    8
  11. DeathPro

    DeathPro

    Joined:
    Jul 28, 2018
    Posts:
    71
    Remote Load Path should not include ".bundle" files. The addressable system automatically fetches the catalog and bundle files. Can you download the .bundle files just like copy and paste them on the browser?

    And what does your Addressables Preferences look like? Maybe, when you take a Player Build you also build addressable automatically that you don't notice...

    upload_2023-10-17_10-56-32.png
     
  12. fatinsyaz

    fatinsyaz

    Joined:
    Oct 4, 2023
    Posts:
    8
    If I should not include ".bundle" files, should I delete the ".bundle" in the url? Or I don't need to upload ".bundle" files on server (only ".HASH" and ".JSON")?
     
  13. DeathPro

    DeathPro

    Joined:
    Jul 28, 2018
    Posts:
    71
    You need to upload everything under "Remote.BuildPath" to "Remote.LoadPath" manually.


    Yes, you need to delete "/....bundle" in the URL. The addressable system first checks the catalog hash if any new or updated bundle exist. Then If necessary, it will get the catalog. Then it will get the .bundles provided with "Remote.LoadPath" which is a URL in your case. The addressable system automatically adds the "/...bundle" end of the URL.