Cannot read property '_updateMaterial' of undefined

环境: Cocoscreator 3.6.2 windows11 visualstuidio 2022

17:56:31 [DEBUG]: D/ JS: [ERROR]: TypeError: Cannot read property ‘_updateMaterial’ of undefined
TypeError: Cannot read property ‘_updateMaterial’ of undefined
at RoleMonster.dealShader (assets/main/index.a78db.js:20526:37)
at RoleMonster.manualUpdate (assets/main/index.a78db.js:20657:16)
at RoleMonster.manualUpdateForMoster (assets/main/index.a78db.js:22894:17)
at MosterAI.voidCheckPosition (assets/main/index.a78db.js:16185:26)
at MosterAI.updata (assets/main/index.a78db.js:16299:16)
at BattleManagerDe
浏览器运行毫无问题。为什么打包 windows 就出问题了呢。

android windows 都有同样的问题。 官方的朋友请出面指点一下。

具体怎么使用出现的?

使用shader 的时候出现的,第一用,不是很会。


这个问题可以合并这个 pr 试试,记得重新编译引擎,适配层的代码编译需要手动执行:
npm run bundle-adapter
合并后直接通过:
mat.setProperty(‘config’,value);
this.renderCom.customMaterial = mat;
来进行更新;