Hey guys,
I’ve wasted the past 6 hours of my life trying to figure out why I’m getting the dreaded crossdomain.xml missing error when deploying my project to the web, and I can’t figure it out; as far as I know, I’m doing everything to the letter. My build works in the editor and in a windows build. Would someone point out what the heck I’m doing wrong?
Here is my crossdomain.xml file, which I shouldn’t need because it’s within the same domain :
http://www.quantumward.com/crossdomain.xml
Here is my code :
Debug.Log("1");
var www = new WWW("http://www.quantumward.com/assetbundles/test.assetbundle");
Debug.Log("2");
yield return www;
Debug.Log("3");
// ...
Debug.Log("4");
var req = www.assetBundle.LoadAsync("cube", typeof(Object));
Debug.Log("5");
yield return req;
Debug.Log("6");
// ...
Debug.Log("REQ=" + req.asset);
yield break;
And this is my log :
120319 23:33:51 ------------------------------------------------------------
120319 23:33:51 Instance starting, version 3.5.0f5_dae8896b94af, UNITY_WEB_ENABLE_AUTODOWNLOAD: 1, GetDisableAutoUpdates(): 0
120319 23:33:51 Datafile http://www.quantumward.com/webplayer/WebPlayer.unity3d
web: player version 3.5.0f5
GfxDevice: creating device client; threaded=0
Direct3D:
Version: Direct3D 9.0c [nvd3dum.dll 8.17.12.8562]
Renderer: NVIDIA GeForce GTX 590
Vendor: NVIDIA
VRAM: 1503 MB (via DXGI)
Caps: Shader=30 DepthRT=1 NativeDepth=1 NativeShadow=1 DF16=0 DF24=0 INTZ=1 RAWZ=0 NULL=1 RESZ=0 SlowINTZ=0
web: load mono
Mono path[0] = ‘C:/Users/Quantum/AppData/LocalLow/Unity/WebPlayer/player/3.x.x/Data/lib’
Mono path[1] = ‘C:/Users/Quantum/AppData/LocalLow/Unity/WebPlayer/mono/3.x.x/Data/lib’
PlayerConnection::Initialize
PlayerConnection constructor
Playerconnection 3
Timed out. Continuing without host connection.
web: start, src=WebPlayer.unity3d abs=http://www.quantumward.com/webplayer/WebPlayer.unity3d
Player: init engine
PlayerConnection::Initialize
web: sucessfully initialized
120319 23:33:52 loader: start ok
120319 23:33:52 Player hash c246c8ab3cc9cdf4c2ae019187c7995bae6a8129 not known
120319 23:33:52 Times: download 0.3 load 0.6
Begin MonoManager ReloadAssembly
Platform assembly: C:\Users\Quantum\AppData\LocalLow\Unity\WebPlayer\player\3.x.x\Data\lib\UnityEngine.dll (this message is harmless)
Non platform assembly: C:\Users\Quantum\AppData\LocalLow\Unity\WebPlayer\player\3.x.x\Assembly-CSharp-firstpass.dll (this message is harmless)
Loading C:\Users\Quantum\AppData\LocalLow\Unity\WebPlayer\player\3.x.x\Assembly-CSharp-firstpass.dll into Unity Child Domain
Non platform assembly: C:\Users\Quantum\AppData\LocalLow\Unity\WebPlayer\player\3.x.x\Assembly-CSharp.dll (this message is harmless)
Loading C:\Users\Quantum\AppData\LocalLow\Unity\WebPlayer\player\3.x.x\Assembly-CSharp.dll into Unity Child Domain
- Completed reload, in 0.076 seconds
Initializing (RawInput).
Input initialized.
desktop: 2560x1600 60Hz; virtual: 2560x1600 at 0,0
Platform assembly: C:\Users\Quantum\AppData\LocalLow\Unity\WebPlayer\mono\3.x.x\Data\lib\System.Core.dll (this message is harmless)
1
UnityEngine.Debug:Internal_Log(Int32, String, Object)
UnityEngine.Debug:Log(Object)
c__Iterator0:MoveNext()
(Filename: C:/BuildAgent/work/b0bcff80449a48aa/Runtime/ExportGenerated/WebPlayer/UnityEngineDebug.cpp Line: 43)
2
UnityEngine.Debug:Internal_Log(Int32, String, Object)
UnityEngine.Debug:Log(Object)
c__Iterator0:MoveNext()
(Filename: C:/BuildAgent/work/b0bcff80449a48aa/Runtime/ExportGenerated/WebPlayer/UnityEngineDebug.cpp Line: 43)
3
UnityEngine.Debug:Internal_Log(Int32, String, Object)
UnityEngine.Debug:Log(Object)
c__Iterator0:MoveNext()
(Filename: C:/BuildAgent/work/b0bcff80449a48aa/Runtime/ExportGenerated/WebPlayer/UnityEngineDebug.cpp Line: 43)
4
UnityEngine.Debug:Internal_Log(Int32, String, Object)
UnityEngine.Debug:Log(Object)
c__Iterator0:MoveNext()
(Filename: C:/BuildAgent/work/b0bcff80449a48aa/Runtime/ExportGenerated/WebPlayer/UnityEngineDebug.cpp Line: 43)
You are trying to load data from a www stream which had the following error when downloading.
Rejected because no crossdomain.xml policy file was found
UnityEngine.WWW:get_assetBundle()
c__Iterator0:MoveNext()
[C:/BuildAgent/work/b0bcff80449a48aa/Runtime/Export/WWW.cpp line 1369]
(Filename: C:/BuildAgent/work/b0bcff80449a48aa/Runtime/Export/WWW.cpp Line: 1369)
NullReferenceException: Object reference not set to an instance of an object
at Main+c__Iterator0.MoveNext () [0x00000] in :0
(Filename: Line: -1)