Quantcast
Channel: Questions in topic: "webgl"
Viewing all articles
Browse latest Browse all 2390

Texture is not loading using WWW class in WebGL build.

$
0
0
The project runs properly on editor, but not when uploaded to the server. In my project, i am fetching some detail from a table on my server and a profile pic using a link, I am getting all the data from table successfully, but profile picture is unable to load. here is the code i written. string profileLink; IEnumerator LoadWebData(WWW www) { yield return www; if (string.IsNullOrEmpty(www.error) && !www.text.Contains("record not found")) { usr = JsonReader.Deserialize(www.text); name_p1.text = usr.display_name; name_p2.text = usr.display_name; point_p1.text = usr.points; point_p2.text = usr.points; karma_p1.text = usr.level; karma_p2.text = usr.level; } if (usr.profile_pic != "") { profileLink = "www.twitchtime.com/doforward/wp-content/uploads/2017/" + usr.profile_pic; WWW www2 = new WWW(profileLink); StartCoroutine(LoadProfilePic(www2)); } } IEnumerator LoadProfilePic(WWW www2) { yield return www2; if (string.IsNullOrEmpty(www2.error)) { profilePic.mainTexture = www2.texture; profilePic2.mainTexture = www2.texture; debugStr.text = profileLink; } debugStr.text = www2.error; } It shows unknown error in debugStr label.

Viewing all articles
Browse latest Browse all 2390

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>