1
0
mirror of https://github.com/godotengine/godot.git synced 2025-12-03 16:55:53 +00:00

Merge pull request #62309 from reduz/remake-resource-thread-safety

Remake ResourceCache thread safety code and API
This commit is contained in:
Rémi Verschelde
2022-06-25 14:09:28 +02:00
committed by GitHub
15 changed files with 117 additions and 126 deletions

View File

@@ -5455,7 +5455,7 @@ void CanvasItemEditorViewport::_create_nodes(Node *parent, Node *child, String &
}
child->set_name(name);
Ref<Texture2D> texture = Ref<Texture2D>(Object::cast_to<Texture2D>(ResourceCache::get(path)));
Ref<Texture2D> texture = ResourceCache::get_ref(path);
if (parent) {
editor_data->get_undo_redo().add_do_method(parent, "add_child", child, true);