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

Why there was not a sync loading of resource? #17818

Open
longchuan opened this issue Nov 6, 2024 · 5 comments
Open

Why there was not a sync loading of resource? #17818

longchuan opened this issue Nov 6, 2024 · 5 comments
Labels
Bug Feature Request Needs Triage Needs to be assigned by the team

Comments

@longchuan
Copy link
Contributor

Cocos Creator version

3.8.4

System information

windows 11

Issue description

image
loadAny was an async method.
I want to load a resource by sync,but I did not find the method.

Relevant error log output

No response

Steps to reproduce

I want to load a resource by sync,but I did not find the method.

Minimal reproduction project

No response

@longchuan longchuan added Bug Needs Triage Needs to be assigned by the team labels Nov 6, 2024
@longchuan
Copy link
Contributor Author

when you use the await,the method will be break,That was not sync.

@longchuan
Copy link
Contributor Author

longchuan commented Nov 8, 2024

the pipline achieves async by promise,the engine did not provide a sync method of normal pipline.

@longchuan
Copy link
Contributor Author

Could the engine support the sync normal pipline?
@minggo

@minggo
Copy link
Contributor

minggo commented Nov 8, 2024

Yep, may implement it in future.

@longchuan
Copy link
Contributor Author

longchuan commented Nov 10, 2024

the xmlhttprequest was async,and the pipline of replaceExtension(promise) was async.And achieve the sync by loadScene,that
was the only method of sync by init.For achieve other sync,that should have no instructions(life cycles or codes) after the load.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Feature Request Needs Triage Needs to be assigned by the team
Projects
None yet
Development

No branches or pull requests

2 participants