You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-08 12:40:44 +00:00
Remake resource thread safety and API
* Ensures thread safety when resources are destroyed. * Simplified API by always forcing `ResourceCache::get_ref`, which needs less hacks and is fully thread safe. * Removed RWLock for resources because its not possible to use for the new logic. Should not be a problem. Supersedes #57533
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user