Playmaker Forum

Playmaker Help & Tips => Playmaker Help => Topic started by: wetcircuit on March 04, 2018, 06:50:18 AM

Title: Texture from URL in WebGL? WWWPOST gives errors on build….[SOLVED]
Post by: wetcircuit on March 04, 2018, 06:50:18 AM
I'm trying to build for WebGL with image textures pulled from an URL – Unity2017.3.0f3

WWWPOST works in Editor but throws "MovieTexture" errors that stop the build. I have to delete the .cs before I can successfully build a WebGL project.

WWWPOSTMobile also works in Editor but fails gracefully in the final WebGL project (texture doesn't load but Is Error event fires correctly).

Is there a different action/method I should use with WebGL? Is there something I have missed? Thank you for advice.
Title: Re: Texture from URL in WebGL? WWWPOST gives errors on build….
Post by: djaydino on March 04, 2018, 06:57:29 AM
Hi,
The action does not work for webgl only the platforms stated on the image :

(https://i.imgur.com/B0FFPPal.png)
Title: Re: Texture from URL in WebGL? WWWPOST gives errors on build….
Post by: wetcircuit on March 04, 2018, 06:59:31 AM
Thank you for confirming, are there any options for WebGL?
Title: Re: Texture from URL in WebGL? WWWPOST gives errors on build….
Post by: djaydino on March 04, 2018, 07:00:53 AM
Hi,
I just check on unity and you will have to do stuff on your server to be able to use www :

https://answers.unity.com/questions/1071842/load-url-images-in-webgl.html
Title: Re: Texture from URL in WebGL? WWWPOST gives errors on build….
Post by: wetcircuit on March 04, 2018, 07:31:14 AM
Pointing to an image URL on the same web domain as the project is working correctly with WWWPOSTMobile.

 ::) Thank you. I would never have known that, and just a silly coincidence my test scene and the image were not at the same web domain.
Title: Re: Texture from URL in WebGL? WWWPOST gives errors on build….
Post by: djaydino on March 04, 2018, 04:43:57 PM
Hi,
I am happy you got it to work :)