0
當我在Unity3D(c#)中使用WWW時,我發現了荒謬的結果。c#unity www.text錯誤文本不在www.error
www.text的錯誤文本不在www.error中。所以我無法檢查是否發生錯誤。
if(!string.IsNullOrEmpty (www.error)) {
//handling error
//but www.error is null
}else{
//print www.text
Debug.Log(www.text);
}
[打印控制檯]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>503 Service Temporarily Unavailable</title>
</head><body>
<h1>Service Temporarily Unavailable</h1>
<p>The server is temporarily unable to service your
request due to maintenance downtime or capacity
problems. Please try again later.</p>
<p>Additionally, a 404 Not Found
error was encountered while trying to use an ErrorDocument to handle the request.</p>
</body></html>
確實有人有這樣的經歷?請幫我..
在if(!string.IsNullOrEmpty(www.error))行顯然插入一個斷點www。 錯誤不是null.Maybe它只包含空格 – 2014-09-01 12:44:32