Loading from streaming assets in obb fails.. but not always.
Hello everybody.
In a current android project I want to load an .mp4 video from the streaming assets. Nothing special about that.. the normal .apk works fine.
The problem starts after splitting the binary for the store.
Here the basics of the problem:
loading from streaming assets with a splitted apk (obb) fails, when game complete
levels are loading.. so the obb has been found.
loading a video works fine, if 2 of the 4 language packages are deleted (doesn't matter which one)
Therefore: the plugin is also working with an obb and the path is basically correct
version with 3 language packs and only 1 (instead of 32) videos is not working (although the obb is smaller than the working one = size appears not to be the problem)
Do you have any guesses, tips or even solutions to this?
Seems to me like a building bug, because the (otherwise) working plugin can't find the video file in the right path. Would be really glad, thanks in advance!
Cheers.
Here the path the plugin is looking for the video (in both cases):
jar:file:///storage/emulated/0/Android/obb/~bundleidentifier~/main.3.~bundleidentifier~.obb!/assets/MainMenu_Video_Android.mp4
The error:
AndroidJavaException: java.lang.RuntimeException: File "assets/MainMenu_Video_Android.mp4"not found in zip
08-13 15:11:59.536: I/Unity(18140): java.lang.RuntimeException: File "assets/MainMenu_Video_Android.mp4"not found in zip
Answer by SirLaur · Dec 14, 2017 at 08:52 AM
Hey. Can you tell me what is the path to the video in the OBB file ? For example, without binary split, I find the path with : string path = Application.streamingAssetssPath + "/" + "MyVideo.mp4"; What is the path if I build the application with binary split ? Thanks a lot.
Your answer
Follow this Question
Related Questions
Path to streamingassets obb video 0 Answers
How to play a video inside a canvas with world space in unity3d 0 Answers
Unity and Vuforia on Android: Could Not Load Video from OBB 1 Answer
Video Player Memory Usage 1 Answer
Unity 5 mobile video stops after a second using Handheld.PlayFullScreenMovie() 0 Answers