MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / _capture

Method _capture

modules/multiplayer/multiplayer_debugger.cpp:72–95  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70}
71
72Error MultiplayerDebugger::_capture(void *p_user, const String &p_msg, const Array &p_args, bool &r_captured) {
73 if (p_msg == "cache") {
74 Array out;
75 for (int i = 0; i < p_args.size(); i++) {
76 ObjectID id = p_args[i].operator ObjectID();
77 Object *obj = ObjectDB::get_instance(id);
78 ERR_CONTINUE(!obj);
79 if (Object::cast_to<SceneReplicationConfig>(obj)) {
80 out.push_back(id);
81 out.push_back(obj->get_class());
82 out.push_back(((SceneReplicationConfig *)obj)->get_path());
83 } else if (Object::cast_to<Node>(obj)) {
84 out.push_back(id);
85 out.push_back(obj->get_class());
86 out.push_back(String(((Node *)obj)->get_path()));
87 } else {
88 ERR_FAIL_V(FAILED);
89 }
90 }
91 EngineDebugger::get_singleton()->send_message("multiplayer:cache", out);
92 return OK;
93 }
94 ERR_FAIL_V(FAILED);
95}
96
97// BandwidthProfiler
98

Callers

nothing calls this directly

Calls 7

ObjectIDMethod · 0.80
sizeMethod · 0.65
StringClass · 0.50
push_backMethod · 0.45
get_classMethod · 0.45
get_pathMethod · 0.45
send_messageMethod · 0.45

Tested by

no test coverage detected