- Home /
Question by
liner · Feb 16, 2012 at 05:33 AM ·
webplayersendmessage
The function SendMessage in js can not return values?
I had used SendMessage in a js function,like this:
function doSetValues(){ var values = server + ";" + shopname + ";" + userid + ";" + username + ";" + karmakey + ";" + role;
Unity.SendMessage("LoginAndRegisterGUI", "setValues", values);
}
In the unity's script,I used Application.ExternalCall( "doSetValues", "shopname"); to call uper function .and put the code in the update() method.
and meanwhile,I implemented the callback function setValues just to output the param values.
but now, the js function has been called, but the setValues() not be called anyway,I don't know what the problem is? can you help me?
Thanks a lot!
//I am from China,and my English is poor,but I has tried to describe the problem clearly! //Waiting the answers,and thanks again.
Comment
Your answer
