| 650 | } |
| 651 | |
| 652 | void SceneDebugger::_set_object_property(ObjectID p_id, const String &p_property, const Variant &p_value, const String &p_field) { |
| 653 | Object *obj = ObjectDB::get_instance(p_id); |
| 654 | if (!obj) { |
| 655 | return; |
| 656 | } |
| 657 | |
| 658 | String prop_name = p_property; |
| 659 | if (p_property.begins_with("Members/")) { |
| 660 | Vector<String> ss = p_property.split("/"); |
| 661 | prop_name = ss[ss.size() - 1]; |
| 662 | } |
| 663 | |
| 664 | Variant value; |
| 665 | if (p_field.is_empty()) { |
| 666 | // Whole value. |
| 667 | value = p_value; |
| 668 | } else { |
| 669 | // Only one field. |
| 670 | value = fieldwise_assign(obj->get(prop_name), p_value, p_field); |
| 671 | } |
| 672 | |
| 673 | obj->set(prop_name, value); |
| 674 | } |
| 675 | |
| 676 | void SceneDebugger::_next_frame() { |
| 677 | SceneTree *scene_tree = SceneTree::get_singleton(); |
nothing calls this directly
no test coverage detected