playMaker

Author Topic: Texture from URL in WebGL? WWWPOST gives errors on build….[SOLVED]  (Read 2897 times)

wetcircuit

  • Full Member
  • ***
  • Posts: 158
    • wetcircuit.com
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.
« Last Edit: March 04, 2018, 06:44:13 PM by djaydino »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Texture from URL in WebGL? WWWPOST gives errors on build….
« Reply #1 on: March 04, 2018, 08:57:29 AM »
Hi,
The action does not work for webgl only the platforms stated on the image :


wetcircuit

  • Full Member
  • ***
  • Posts: 158
    • wetcircuit.com
Re: Texture from URL in WebGL? WWWPOST gives errors on build….
« Reply #2 on: March 04, 2018, 08:59:31 AM »
Thank you for confirming, are there any options for WebGL?

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Texture from URL in WebGL? WWWPOST gives errors on build….
« Reply #3 on: March 04, 2018, 09: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

wetcircuit

  • Full Member
  • ***
  • Posts: 158
    • wetcircuit.com
Re: Texture from URL in WebGL? WWWPOST gives errors on build….
« Reply #4 on: March 04, 2018, 09: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.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Texture from URL in WebGL? WWWPOST gives errors on build….
« Reply #5 on: March 04, 2018, 06:43:57 PM »
Hi,
I am happy you got it to work :)