I am working on an AR application (for the first time) for android using Unity 3D & Vuforia. The idea is the following : I want to detect a marker (an image). Once it is detected, a cuboid is instantiated and the video plays on the cuboid.
Running the application on Unity Editor works fine. The markers are detected correctly and the video plays and I have full control over it (pause it etc...). However, building the project for android results of an application that detect the marker, instantiate the cuboid but the latter stays white therefore I am not able to run the video.
As far as I know, assets are embedded in the build, so the user should not (does not have to) have the video in his local storage (on android file system). Therefore, I will be happy if some could help me to fix this issue.
Some additional notes (they may be usefull) :
- The application was tested on multiple android devices. Its behaviour is the same (exactly as mentioned above)
My build settings :
Build setting_1
Minimum API Level : Android 7.0 'Nougot' (API Level 24)
Scripting Backend IL2CPP
Target Architecture : ARM64
As I am using Vuforia, I have already a file created called StreamingAssets. As mentioned here. I put the video inside this folder but this has no effect.
In addition, having the video on the phone, and read it from the local storage it may be a solution, but it is not aligned with my business requirements. I though to put the videos on an online server, therefore, it will be possible to download them, read them from local memory, once the video finished I will clear the memory from that video. To be honest, I haven't tested this solution yet, However, I guess it is not a best practice.
EDIT:
I would love to add that I have also changed the video's codec to H264. Nothing special happened.