How do I access the files of unity application stored inside Android?

I'm using the easymovietexture plug-in. I want to access the Android folder where all videos are saved. First, I try to access the streaming media asset folder, but I can't access it in the application (copying files into asset folder in Android), so I created a folder where all videos are located, And I want to access this specific folder to play the video separately. This is a sample code that can load the video from the URL, but I want it to be accessible from the storage-

void OnGUI() {


    if( GUI.Button(new Rect(50,50,100,100),"Load"))
    {
        scrMedia.Load("Url of video");
        m_bFinish = false;
    }

How to access video in interval storage for playback. Thank you in advance

resolvent:

All files in the streamingassets folder will be included in your version and can be accessed through the path specified by application.streamingassets path

However, the manual mentions important warnings for Android:

If your video plug-in can access files in APK, just specify the correct path

If your video plug-in needs a regular file, you need to create a regular file. Unity's www class can read the compressed file into memory, and then you can use system.file.writeallbytes to write it to other locations (such as application.temporarycachepath)

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>