Closed GarethIW closed 9 years ago
Check this out, let me know if it helps: https://github.com/andyburke/UnityHTTP/issues/1
That did help, but it's not an easy issue to solve if you don't have full control over the server you're hosting the webplayer on.
I decided to take a different route - using webplayer browser calls to the host page and run the webapi calls using jquery. I still use UnityHTTP calls for the other platforms, and refactored my callbacks so they work with both UnityHTTP and javascript.
In case anyone is having the same fun as me, here's a gist for my workaround: https://gist.github.com/GarethIW/0ecdbba5083f39547f76
Hope this isn't "stupid question" territory, but here goes.
I'm trying to use the https://www.leaderboards.io webapi from Unity using UnityHTTP. It's working fine in desktop builds. In webplayer builds, the following exception occurs:
SecurityException: Unable to connect, as no valid crossdomain policy was found
I'm making a PUT request asynchronously like so:
A crossdomain.xml file exists at https://api.leaderboards.io/crossdomain.xml. I get the policy not found exception when running in the editor (webplayer platform) and also with the webplayer (hosted locally on IIS and also tried on Azure).
I tried doing a Fiddler debug, but the request doesn't show at all (in either the desktop build or webplayer - not sure if it should!)
Unity version 5.1.2f1, by the way.
Any ideas?