var www;
var cube:GameObject;
function Start() {
www = new WWW("http://www.mywebpage.com/game/unitytest2.php");
yield www;
if(www.text == "hello"){
cube.renderer.material.color = Color.blue;
}else{
cube.renderer.material.color = Color.red;
}
}
The php code resides in the same directory on the server and the php code simply echo's "hello" to the client.
There is a crossdomain.xml file in the root and in the local directory where the unity file, html page, and php files live.
Any help is appreciated.
↧
Trending Articles
More Pages to Explore .....