-1

当我尝试使用cc.resources.load(arg1, arg2)时,我收到此错误:

Uncaught (in promise) TypeError: Cannot read property 'load' of undefined

据我所知,它是一个内置的 Cocos Creator 类,文档本身说要使用它。当我尝试调用cc.log(cc.resources)时,它会显示undefined在控制台中。我的项目中存在一个名为“resources”的文件夹,它不是空的。

4

1 回答 1

0

cc.resources在 Cocos Creator 2.3.3 中不可用,只有 2.4。

解决方法是使用函数cc.loader.loadRes

于 2020-07-10T16:07:45.760 回答