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

UMG中使用DynamicEntryBox,如果在生成的Entry中执行异步加载,会导致找不到绑定的Object #379

Closed
unicodecndddd opened this issue Mar 10, 2022 · 4 comments
Labels
bug Something isn't working

Comments

@unicodecndddd
Copy link

UMG中使用DynamicEntryBox,如果在生成的Entry中执行异步加载,会导致找不到绑定的Object。

@unicodecndddd
Copy link
Author

重现方法是:
1.在一次循环中多次调用DynamicEntryBox::BP_CreateEntry,并在创建的Entry中执行异步加载。
2.第二个创建的Entry,在调用它的OnInitialized时,会找不到对应的Object。

@unicodecndddd
Copy link
Author

原因是在执行第二个Entry的的绑定时,FLuaContext::TryToBindLua中的条件if (!IsInGameThread() || IsAsyncLoading())被触发,绑定过程被延后了,但OnInitialized却直接执行了。

@xuyanghuang-tencent
Copy link
Collaborator

理解你的意思了,看来得找另外个接口来判断需要绑定的对象是否处于异步加载中。如果去掉IsAsyncLoading的判断,会在4.27导致 #365 这个问题

@xuyanghuang-tencent
Copy link
Collaborator

v2.1.4

@xuyanghuang-tencent xuyanghuang-tencent removed the pending release This will be released on next version label Nov 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants