Before updating to Windows 10 you may need to return your Pro license. More information here

Got "no crossdomain.xml policy" while loading a local assetbundle by WWW on a web player

I try to use WWW class and a relative path to load a local assetbundle on a web player.

 WWW www = new WWW("./WebPlayer/BigTree.unity3d");

The error message I got is "Rejected because no crossdomain.xml policy file was found."

The relative path should be correct because I can normally run my program on some computers. However, I got this error message on few computers.

I am wondering that if I can load a assetbundle locally ? If I can do it, do I use the right way to do it ? Does WWW class always use socket to load files even if the file is in a local file system ?

My OS is Windows XP, and the web player version is 3.4.1f5. In addition, when I got this error message, the Application.dataPath is "file:/". I am not sure if this is relevant to this problem, but I try to give as much information as I can.

Thank you.

more ▼

asked May 07, 2013 at 12:55 PM

avatar image

1 4 4 5

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

You need to give the full URL including the http and server host. Relative URNs are not supported. The webplayer has no access to the file system of the client where it is running. You should not expect to be able to load asset bundles from the file:// protocol. Application.dataPath is returning file:// presumably because you are launching the webplayer using an html document on your computer. Asset bundles can only be fetched from webservers. The doc page for asset bundles shows how to load them in the editor if you are testing them.

more ▼

answered May 07, 2013 at 08:42 PM

avatar image

Graham Dunnett ♦♦
27.9k 37 62 188

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments



asked: May 07, 2013 at 12:55 PM

Seen: 1212 times

Last Updated: May 07, 2013 at 08:42 PM