You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-22 15:06:45 +00:00
ResourceLoader: Handle another case of user tokens
(cherry picked from commit 0441c67de6)
This commit is contained in:
@@ -528,6 +528,11 @@ Ref<ResourceLoader::LoadToken> ResourceLoader::_load_start(const String &p_path,
|
|||||||
if (!ignoring_cache && thread_load_tasks.has(local_path)) {
|
if (!ignoring_cache && thread_load_tasks.has(local_path)) {
|
||||||
load_token = Ref<LoadToken>(thread_load_tasks[local_path].load_token);
|
load_token = Ref<LoadToken>(thread_load_tasks[local_path].load_token);
|
||||||
if (load_token.is_valid()) {
|
if (load_token.is_valid()) {
|
||||||
|
if (p_for_user) {
|
||||||
|
// Load task exists, with no user tokens at the moment.
|
||||||
|
// Let's "attach" to it.
|
||||||
|
_load_threaded_request_setup_user_token(load_token.ptr(), p_path);
|
||||||
|
}
|
||||||
return load_token;
|
return load_token;
|
||||||
} else {
|
} else {
|
||||||
// The token is dying (reached 0 on another thread).
|
// The token is dying (reached 0 on another thread).
|
||||||
|
|||||||
Reference in New Issue
Block a user