cocos creator 版本 2.2.0.
问题描述:
- 参考 3D 的材质文档制作, 在 Web 下可以正常使用;
- 打包到原生的时候(iOS)平台, 在 Creator 工具内提示:
The referenced asset used in “db://assets/resources/ground/HighlightMaterial.mtl” is not found, it may have been deleted. Detailed information:
Used in object: “HighlightMaterial”
uuid: “c3ecb4a7-5524-4a79-bcdd-cd78cbe74e6a”
- 在真机环境运行的时候, 加载使用该材质的 Prefab 的时候, 闪退, xcode 日志;
[ERROR] (/Users/xxxxx/projects/aaaa/code/app/build/jsb-default/frameworks/cocos2d-x/cocos/scripting/js-bindings/jswrapper/v8/Object.cpp, 534): Invoking function (0x282a0f300) failed!
ERROR: Uncaught TypeError: Cannot read property ‘setBlend’ of null, location: src/cocos2d-jsb.d1192.js:0:0
请问现在如果我想在原生层使用 shader, 该怎么办呢?