I'm building a Unity project with an obb expansion package. According to the docs: https://docs.unity3d.com/2018.4/Documentation/ScriptReference/Application-dataPath.html Android: Normally it would point directly to the APK. The exception is if you are running a split binary build in which case it points to the the OBB instead. However, for me it is pointing the the APK: /data/app/com.oculus.game-1/base.apk I'm building using Unity 2018.2.20f1 targeting the Quest. Any ideas?
Hi, this happens when OBB can't be loaded during the runtime. Do you heave READ_EXTERNAL_STORAGE permission in the manifest? Is that permission granted?
I clicked the box to Export Project. In there I found AndroidManifest.xml, I'm guessing that's what Unity is using internally? In that file it has the permission: <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> Where should I be putting the obb file? Currently I'm putting it in: /sdcard/Android/obb/com.oculus.game
To answer my own question... again... You can't just load the obb file into the folder, you have to rename it as well. Code (csharp): adb push -p game.main.obb /sdcard/Android/obb/com.oculus.game/main.1.com.oculus.game.obb What do you mean you couldn't just guess that?
hi, i find the datapath point to apk. i have the permission, but I am export project to build android apk. I try to unity build, the path of the obb is the same, but the datapath point to obb
hi, i find the datapath point to apk. i have the permission, but I am export project to build android apk. I try to unity build, the path of the obb is the same, but the datapath point to obb
I'm having the same issue, except I'm using Build & Run so Unity should be naming the OBB for me. I've examined the manifest and it looks to have the required permission. However, my dataPath is unchanged and our game can't load anything from the OBB. Unity: 2020.3.18f1 Code (CSharp): <?xml version="1.0" encoding="utf-8"?> <!-- GENERATED BY UNITY. REMOVE THIS COMMENT TO PREVENT OVERWRITING WHEN EXPORTING AGAIN--> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.unity3d.player" xmlns:tools="http://schemas.android.com/tools"> <application> <activity android:name="com.unity3d.player.UnityPlayerActivity" android:theme="@style/UnityThemeSelector" android:screenOrientation="reverseLandscape" android:launchMode="singleTask" android:maxAspectRatio="16.9" android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale|layoutDirection|density" android:resizeableActivity="false" android:hardwareAccelerated="false"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> <meta-data android:name="unityplayer.UnityActivity" android:value="true" /> <meta-data android:name="android.notch_support" android:value="true" /> </activity> <meta-data android:name="unity.splash-mode" android:value="0" /> <meta-data android:name="unity.splash-enable" android:value="True" /> <meta-data android:name="android.max_aspect" android:value="16.9" /> <meta-data android:name="unity.allow-resizable-window" android:value="False" /> <meta-data android:name="notch.config" android:value="portrait|landscape" /> <meta-data android:name="unity.build-id" android:value="a78a39c7-c8b9-4f6a-a60f-2a6835cf5af2" /> </application> <uses-feature android:glEsVersion="0x00030000" /> <uses-feature android:name="android.hardware.vulkan.version" android:required="false" /> <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> <uses-feature android:name="android.hardware.touchscreen" android:required="false" /> <uses-feature android:name="android.hardware.touchscreen.multitouch" android:required="false" /> <uses-feature android:name="android.hardware.touchscreen.multitouch.distinct" android:required="false" /> </manifest>
For me it was a bug in Unity for specific Android devices (Galaxy S21 in this case). https://issuetracker.unity3d.com/is...-obb-when-split-application-binary-is-enabled