我正在用Unity3d构建游戏代码的服务器,我的服务器是用Yii构建的,但是当我看到Yii tutorial的webservice指南时,我看到它使用soapClient来调用服务器中的函数。但在Unity3d中,我只知道WWW和WWWForm来请求服务器。那么,有谁知道如何在Unity3d中使用webservice与Yii进行通信?
非常感谢。
发布于 2012-05-12 14:47:00
您只需通过WWWForm发送数据
http://unity3d.com/support/documentation/ScriptReference/WWWForm.html
var highscore_url = "http://www.my-site.com/?r=MyGame/highscore";在Yii的控制器中:\protected\controller\MyGameController.php
class MyGame extends Controller
{
public function actionHighscore()
{
// Here you get data from $_REQUEST ($_POST or $_GET)
// and use Yii's power for output some data
// like perl example in link upthere
}
}https://stackoverflow.com/questions/10549755
复制相似问题