轉自:http://www.cnblogs.com/Mygirl/archive/2011/04/02/2003116.html
1、unity向網頁發送數據的函數:Application.ExternalCall("SayHello",gameObject.name),這個函數將調用網頁中的SayHello函數,gameObject.name為傳遞的參數。
2、網頁向unity發送數據的函數:網頁中用GetUnity().SendMessage(message, "AcceptName", buildingname)函數來調用unity中的函數,此函數的參數message為unity中的物體,AcceptName為物體上的函數,buildingname為傳遞的參數。