diff options
author | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2018-02-28 15:08:17 +0100 |
---|---|---|
committer | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2018-02-28 15:08:17 +0100 |
commit | 3a25415a1c2928e22b4eb9da782237ed73fb79c8 (patch) | |
tree | f8f3ad29cbc50f072502f8a24bcc7b837e1bd67a /editor | |
parent | 3d03bcd0636aacfe530c52fc1cdc32c2edffea04 (diff) |
More threading in AssetLib
AssetLib now uses thread as requested to download previews and items
Diffstat (limited to 'editor')
-rw-r--r-- | editor/plugins/asset_library_editor_plugin.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/editor/plugins/asset_library_editor_plugin.cpp b/editor/plugins/asset_library_editor_plugin.cpp index 4b9e5ae301..6999ca86d4 100644 --- a/editor/plugins/asset_library_editor_plugin.cpp +++ b/editor/plugins/asset_library_editor_plugin.cpp @@ -514,6 +514,7 @@ EditorAssetLibraryItemDownload::EditorAssetLibraryItemDownload() { download = memnew(HTTPRequest); add_child(download); download->connect("request_completed", this, "_http_download_completed"); + download->set_use_threads(EDITOR_DEF("asset_library/use_threads", true)); download_error = memnew(AcceptDialog); add_child(download_error); @@ -832,6 +833,7 @@ void EditorAssetLibrary::_request_image(ObjectID p_for, String p_image_url, Imag iq.image_index = p_image_index; iq.image_type = p_type; iq.request = memnew(HTTPRequest); + iq.request->set_use_threads(EDITOR_DEF("asset_library/use_threads", true)); iq.target = p_for; iq.queue_id = ++last_queue_id; |