Hi guys!
I want to access data from my WAMP based database on my localhost. Only using the following script gave me an error:
function Start() {
hs_get = WWW('http://localhost/unity/');
yield hs_get;
if(hs_get.error) {
print("There was an error getting the data: " + hs_get.error);
} else {
Debug.log(hs_get.text);
}
}
There was an error getting the data: Rejected because no crossdomain.xml policy file was found.
So I placed a crossdomain.xml in my localhost. Now if I open the following link: http://localhost/unity/crossdomain.xml I get the crossdomain.xml file. The file contains the following:
<?xml version="1.0"?>
<cross-domain-policy>
<allow-access-from domain="*"/>
</cross-domain-policy>
But still Unity gives me the same error
There was an error getting the data: Rejected because no crossdomain.xml policy file was found
UnityEngine.MonoBehaviour:print(Object)
$:MoveNext() (at Assets/Avatar/Character/_Character.js:45)
I’ve been searching but cannot get an awnser! Can some one help!?