Browse Source

Display multiplayer authority ID in remote debugger

Saracen 1 year ago
parent
commit
66ca317e2c
1 changed files with 6 additions and 0 deletions
  1. 6 0
      scene/debugger/scene_debugger.cpp

+ 6 - 0
scene/debugger/scene_debugger.cpp

@@ -336,6 +336,12 @@ SceneDebuggerObject::SceneDebuggerObject(ObjectID p_id) {
 	}
 	}
 
 
 	if (Node *node = Object::cast_to<Node>(obj)) {
 	if (Node *node = Object::cast_to<Node>(obj)) {
+		// For debugging multiplayer.
+		{
+			PropertyInfo pi(Variant::INT, String("Node/multiplayer_authority"), PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_READ_ONLY);
+			properties.push_back(SceneDebuggerProperty(pi, node->get_multiplayer_authority()));
+		}
+
 		// Add specialized NodePath info (if inside tree).
 		// Add specialized NodePath info (if inside tree).
 		if (node->is_inside_tree()) {
 		if (node->is_inside_tree()) {
 			PropertyInfo pi(Variant::NODE_PATH, String("Node/path"));
 			PropertyInfo pi(Variant::NODE_PATH, String("Node/path"));