Unity Android Path and considerations

Source: Internet
Author: User

application. Temporarycachepath ==/storage/emulated /0/ Android/data/com.***.*** / Cache

applicationpersistentdatapath== /storage/emulated/0 /android/data/com.***.*** < Span style= "COLOR: #008000" >/ Files

< Span style= "COLOR: #008000" > < Span style= "Font-family:consolas" > Maybe you've come across a bit of a problem with the computer reading the file in that directory, and suddenly it's not going to be readable by Android. Yes, right?

Hmm, well, Android is so special, not the file path is not correct, but the way to read the file on Android not ah
He needs to read it in www. Good pit.

path=application.streamingassetspath+ "file name. Suffix "

< Span style= "COLOR: #008000" > < Span style= "Font-family:consolas" >string str;
ienumerator ReadFile (string path)
    {
         www www = new www (path);
        yield return www;

        if (string. IsNullOrEmpty (Www.error))
        {
             str= Www.text;
        }
   }

Unity Android Path and considerations

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.