0

I use the AirConsole Unity to get profile pictures of players inside the game with:

AirConsole.instance.GetProfilePicture ( deviceId, 320 );

This works great with the editor. However, in a production build (WebGL), an exception is thrown because the server lacks a crossdomain.xml file. This causes my WWW request to be blocked by the security system. More info can be found in the Unity documentation: http://docs.unity3d.com/Manual/SecuritySandbox.html

Or maybe I am missing something?

Thanks!

David

David
  • 3
  • 5
  • Do you control the server where the images are stored? No? Who does, do they provide an API? – Draco18s no longer trusts SE Dec 09 '15 at 20:50
  • Hey Draco, no it is managed by AirConsole team. – David Dec 09 '15 at 20:51
  • Ah, I see. AirConsole is something I hadn't heard about before. I wonder if something needs to change on their end. It might be worth contacting them about it. As the way crossdomain policy works is that the remote domain--in this case, AirConsole.com--needs to supply the xml file on their server root, the application needs to request it prior to making the request for any other asset. If that file doesn't exist, is incorrectly configured (i.e. does not include the domain the request is made from), or the request for it is not made, you will get the error you are seeing. – Draco18s no longer trusts SE Dec 09 '15 at 20:55
  • Thanks for the info :-) Yes I hope to reach the developers this is why I tagged it with AirConsole. I think they indeed have to put the file on their side so that my app is able to get the picture. – David Dec 09 '15 at 21:05

1 Answers1

1

Thanks for the report.

We've added access-control-allow-origin: * headers to the image resource which should allow you to load the images inside Unity now.

(crossdomain.xml is outdated from unity web player)

Ping this thread if it doesn't work for you.

Cheers, -Andrin

  • Thanks for the quick fix. I tried the test version on AirConsole and it works great now. – David Dec 10 '15 at 09:43