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

Application.streamingAssetsPath not pointing to OBB file (Samsung Galaxy S6)

Discussion in 'Android' started by shazny, May 8, 2015.

  1. shazny

    shazny

    Joined:
    Nov 10, 2014
    Posts:
    1
    I'm running a split Android application, so apk + obb. App is installed using Unity's build and run function, and this has worked fine on all of the devices I've tested on with the exception of the Samsung Galaxy S6.

    I'm using the WWW class to extract assets from the OBB file, using Application.streamingAssetsPath, however this operation fails on the S6. I believe the reason is that streamingAssetsPath on the S6 points to the APK, and not the OBB.

    Application.streamingAssetsPath = jar:file:///data/app/[app-ID]/base.apk!/

    ... on the other test devices however ...

    Application.streamingAssetsPath = jar:file:///storage/emulated/0/Android/obb/[app-ID]/main.1.[app-ID].obb!/
    I've had a look around on the S6, and the OBB file is present on the device (under /mnt/shell/emulated/obb/), but hard-coding the full path in the app results in an access denied error.

    Does anyone have any guidance on this issue? I'm thinking it could be an issue with the deployment procedure or some Samsung specific funny-business, but otherwise am drawing a blank at this stage.
     
  2. nastasache

    nastasache

    Joined:
    Jan 2, 2012
    Posts:
    74
    I have the same problem using Nexus 7.