1、将unity导出的项目做为安卓项目的lib
2、在UnityPlayerActivity调用callUntiy();
public void callUntiy() {
mUnityPlayer.UnitySendMessage("Mon_00", "ReceiveMsg", "move");
}
1、Mon_00为Unity中的对象名

2、Mon_00脚本里的方法

3、move为传递的数据
1、将unity导出的项目做为安卓项目的lib
2、在UnityPlayerActivity调用callUntiy();
public void callUntiy() {
mUnityPlayer.UnitySendMessage("Mon_00", "ReceiveMsg", "move");
}
1、Mon_00为Unity中的对象名
2、Mon_00脚本里的方法
3、move为传递的数据
本文标题:Android传数据给Unity
本文链接:https://www.haomeiwen.com/subject/egujuxtx.html
网友评论