Search Unity

Question UnityWebRequest text in WEBGL

Discussion in 'Scripting' started by FeboGamedeveloper, Jan 24, 2021.

  1. FeboGamedeveloper

    FeboGamedeveloper

    Joined:
    Feb 2, 2014
    Posts:
    47
    I have a problem, I have this code:
    In short, I make a post call to a site, which gives me an answer.
    In editor it works, in build windows it works, but in build webgl it doesn't work, in the sense that the text does not give me anything (empty strnga).
    Because? And how can I fix it?

    Thanks for answer!

    (below I also attach the php code)




     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,697
    First thing to check is CORS. Google that up, see what's involved, understand the process. Browsers run on a different security model than most other platforms.