关于UnitySendMessage 的一点注意

UnityPlayer.UnitySendMessage("Main Camera", "AgentPurchaseCancelled",msg);

使用android 脚本向 unity发送消息,

参数一为unity脚本挂载的gameobject

参数二为unity脚本中要调用的方法名

参数三为传递的数据


当unity脚本中的方法为静态方法时,这个方法无效,所以只能调用非静态的方法

你可能感兴趣的:(android,unity,unity)