- Home /
crossdomain issue
I am not well in English, so excuse me..
Trying to run my game in browser, but without any luck. It constantly freezes. However, when I run game in Editor it is all ok!! I am try to see the webplayer log, and there are two versions of what happens.
1) I have server at http://localhost:50736. There is http://localhost:50736/crossdomain.xml. When I hosted my game.unity3d in some other host (for example http://game.com/game.html), in log I see the following:
Platform assembly: C:\Users\MaxG\AppData\LocalLow\Unity\WebPlayer\player\Release3.x.x\Data\lib\CrossDomainPolicyParser.dll (this message is harmless)
Determining crossdomain.xml location for request: http://localhost:50736/rpc
About to parse url: http://localhost:50736/rpc
Determining crossdomain.xml location for request: http://localhost:50736/rpc
About to parse url: http://localhost:50736/crossdomain.xml
About to parse url: http://localhost:50736/rpc
Determining crossdomain.xml location for request: http://localhost:50736/rpc
About to parse url: http://localhost:50736/rpc
Determining crossdomain.xml location for request: http://localhost:50736/rpc
About to parse url: http://localhost:50736/rpc
Determining crossdomain.xml location for request: http://localhost:50736/rpc
and so on.
2) When game.unity3d hosted at http://localhost:50736/game.html there no need to check crossdomain.xml. In log I see:
Platform assembly: C:\Users\MaxG\AppData\LocalLow\Unity\WebPlayer\player\Release3.x.x\Data\lib\CrossDomainPolicyParser.dll (this message is harmless)
and nothing more. But browser is freezed.
What is problem? I realy need help.
P.S. I use WWW for requests.
Answer by Noah Dyer · Jan 14, 2015 at 07:45 PM
While you may not see the need for a crossdomain.xml files, Unity disagrees with you ;) You definitely need to have a crossdomain.xml wherever unity checks for it based on your WWW url calls.
You might get some additional help if you install this if you haven't already: http://www.dreammakersgroup.com/products-2/unity3d-in-game-logs/
This is from unity website: The "Unity webplayer expects a http served policy file named crossdomain.xml to be available on the domain you want to access with the WWW class, (although this is not needed if it is the same domain that is hosting the unity3d file)". I understand that it is not needed to have crossdomain.xml when game requests for the same host where .unity3d file is.
I didn't find button download there.. Which problems may cause situation when in Editor webgame run as it is necessary, but in browser all go wrong?You might get some additional help if you install this if you haven't already: http://www.dreammakersgroup.com/products-2/unity3d-in-game-logs/
If you haven't already, turn on the ENABLE_CROSSDO$$anonymous$$AIN_LOGGING environment variable (per the debugging section of the unity webplayer security page). You may get some helpful information. I've found that even though the editor is supposedly simulating the webplayer security settings (but only when webplayer is selected as the build target), some things still work even though the log may output errors. ]
Your answer
Follow this Question
Related Questions
Crossdomain.xml, same server but i get 'Rejected' error ... 2 Answers
How to prevent a Webplayer Game from being saved locally? 1 Answer
Player side settings for security and crossdomain in Unity 3.0 0 Answers
Uniweb(sockets) + Facebook 0 Answers
WWWForm/Communication issue despite having a valid crossdomain.xml 1 Answer