將untiy程序打包到PC端,Application類下的路徑問題
void Start()
{
text = transform.Find("Text").GetComponent<Text>();
text.text = "temporaryCachePath:" + Application.temporaryCachePath;
text.text += "\r\n";
text.text += "dataPath:" + Application.dataPath;
text.text += "\r\n";
text.text += "streamingAssetsPath:" + Application.streamingAssetsPath;
text.text += "\r\n";
text.text += "persistentDataPath:" + Application.persistentDataPath;
text.text += "\r\n";
text.text += "consoleLogPath:" + Application.consoleLogPath;
}
將程序打包到 桌面/圖片 的文件夾下面,輸出結果