3
我使用iOS Unity插件將圖像路徑發送到統一。而在Unity中,我嘗試使用接收路徑來獲取此圖像(我沒有其他想法如何將圖像從iphone發送到統一)。問題:我仍然無法獲得圖像。 WWW錯誤:在此服務器上找不到請求的URL。從Unity在Unity3d中加載圖像
//Tried both "file:///..." and "file://..."
string path = "file://var/mobile/Applications/173DE26D-4C0E-4DF7-9DC6-9CBB7D4FC954/Documents/Images/image.png"
Texture texture;
IEnumerator WaitForRequest(WWW www) {
yield return www;
if (www.error == null) {
texture = www.texture;
}
}
void Start() {
WWW www = new WWW(path);
StartCoroutine(WaitForRequest(www));
}
你只是想訪問一個本地文件,以加載紋理,或稍後將它放在網頁上? – Kay
我只想訪問本地文件以加載紋理。 – JastinBall