[LayaNative 2.0]Laya.PlatformClass.createClass undefined
LAYA 2.1.1.1 native2.1 Laya.PlatformClass.createClass undefined
照抄官方例子的
--------------------------------
我忘记是不是这个原因了 好久了,在通信的那个脚本下面
window["NativeManager"] = NativeManager; 写类似这样的代码。
照抄官方例子的
--------------------------------
我忘记是不是这个原因了 好久了,在通信的那个脚本下面
window["NativeManager"] = NativeManager; 写类似这样的代码。
没有找到相关结果
已邀请:
要回复问题请先登录
5 个回复
130*****140
赞同来自:
taojianlong
赞同来自:
Eric_M
赞同来自:
Laya新用户
赞同来自:
kean
赞同来自:
window["PlatformClass"]这个接口
比如ios:
if(Laya.Browser.onIPhone || Laya.Browser.onIPad){
this.googleIosBridge=window["PlatformClass"].createClass("GoogleIosBridge");
}
可以查看ios的apploader这个文件里面有这个类声明和实现,并且里面有关键的赋值操作为:window["PlatformClass"] = PlatformClass;