Android传数据给Unity
2019-06-26 本文已影响0人
FeelRelus
1、将unity导出的项目做为安卓项目的lib
2、在UnityPlayerActivity调用callUntiy();
public void callUntiy() {
mUnityPlayer.UnitySendMessage("Mon_00", "ReceiveMsg", "move");
}
1、Mon_00为Unity中的对象名

2、Mon_00脚本里的方法

3、move为传递的数据