Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix set font failed in native #7380

Merged
merged 3 commits into from Sep 16, 2020

Conversation

holycanvas
Copy link
Contributor

@holycanvas holycanvas commented Sep 15, 2020

Re: cocos/2d-tasks#3144

Changes:

  • fix set font failed in native platform
  • return error when load direct asset failed even assetManager.force is enabled
  • use copy if requests is array

@holycanvas holycanvas requested a review from PPpro Sep 16, 2020
done(err);
if (err && !task.isFinish) {
if (!cc.assetManager.force || firstTask) {
cc.error(err.message, err.stack);
Copy link
Contributor

@PPpro PPpro Sep 16, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里应该不需要打印错误吗,只要回调能返回错误就行了?

Copy link
Contributor Author

@holycanvas holycanvas Sep 16, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

还是打印下吧,上层经常会有用户不输出 err 信息,然后也没有办法知道是哪儿错了

@@ -171,9 +170,8 @@ var utils = {
}
}
catch (e) {
err = e;
cc.error(e.message, e.stack);
Copy link
Contributor

@PPpro PPpro Sep 16, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里需要判断是否为 force 吗

Copy link
Contributor Author

@holycanvas holycanvas Sep 16, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不用,这里是查询依赖的地方,理论上是不会出错的,除非资源在网络传输过程中被第三方篡改了,如果出错了用户必须自己解决,force 也没用

PPpro
PPpro approved these changes Sep 16, 2020
@holycanvas holycanvas merged commit 1804559 into cocos:v2.4.3-release Sep 16, 2020
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants