JSB in Cocos Creator 3D?

Is the JSB available in cocos creator 3D preview or 1.2.x 3D version?
And how to call it?
Thanks so much.

Is still available, but not defined in the creator.d.ts .
you can use globalThis , like: globalThis.jsb.xxx.xxx
or add a global variable called JSB in creator.d.ts

you can use the Definition provided by third party,
get and put jsb.d.ts file in {projectName}\temp\declarations\

1赞

Thank you bro.
It’s working perfectly !!!
I used the globalThis for reflection.
(Note: for older ios versionthe globalThis do not woking…u must be check typeof this)

We have polyfill for that. If not available, you can try to toggle “CoreJS polyfill” option in builder planel.

该主题在最后一个回复创建后14天后自动关闭。不再允许新的回复。