unity PC端讀取StreamingAssets中的txt文件內容


之因此使用StreamingAssets文件夾好處,就是PC端發佈程序後,能夠找到StreamingAssets中的文件code


void Start()
    {
        StartCoroutine(startt());

    }
    IEnumerator startt()
    {
        //讀取streamingasset
        WWW www = new WWW(Application.streamingAssetsPath + "/config.txt");
        yield return www;
        QuanJu.userid = www.text;
    }

 


FR:徐海濤(hunk Xu)blog

相關文章
相關標籤/搜索