Improve usage of String.split() vs get_slice()
This commit is contained in:
parent
2753d333f6
commit
d61a337a70
17 changed files with 45 additions and 50 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue