Search Unity

Android resources.load returns null on exported project

Discussion in 'Android' started by SpingDeveloper, Dec 21, 2017.

  1. SpingDeveloper

    SpingDeveloper

    Joined:
    Nov 21, 2017
    Posts:
    13
    Hi Guys,

    I'm having an issue in the Android version of our Unity3D VR app. So in the editor and when building the app to a Pixel 2 device everything works fine. But when exporting the Unity3D VR App to an Android studio project I start to get errors on using Resources.Load<GameObject>("pathToPrefab");

    Now keep in mind the asset is there and working fine in the editor (pressing the play button) and building the VR app directly to the phone.

    Anybody got an idea?

    The exception i'm getting in Android studio:

     
    Last edited: Dec 22, 2017
  2. SpingDeveloper

    SpingDeveloper

    Joined:
    Nov 21, 2017
    Posts:
    13
    Right so I'e investigated this problem a bit more and it seems that when building the app from Unity3D directly to the phone it creates a .obb file. This same .obb file is missing when creating exporting the app from Unity3D to an Android Studio project and then building and running it from Android studio. I suspect that's why my Resources.Load is empty. Anyone has any experience creating a .obb file in Android studio for a Unity3D exported project?
     
  3. b33rdy

    b33rdy

    Joined:
    May 6, 2013
    Posts:
    9
    I have this same problem, did you find a solution to it?