1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +00:00

Improve usage of String.split() vs get_slice()

This commit is contained in:
kobewi
2023-09-27 22:37:24 +02:00
parent 2753d333f6
commit d61a337a70
17 changed files with 45 additions and 50 deletions

View File

@@ -647,10 +647,11 @@ void SceneDebugger::_set_object_property(ObjectID p_id, const String &p_property
return;
}
String prop_name = p_property;
String prop_name;
if (p_property.begins_with("Members/")) {
Vector<String> ss = p_property.split("/");
prop_name = ss[ss.size() - 1];
prop_name = p_property.get_slicec('/', p_property.get_slice_count("/") - 1);
} else {
prop_name = p_property;
}
Variant value;