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为传递的数据

上一篇 下一篇

猜你喜欢

热点阅读