Improve null and object printing to avoid confusion with arrays

- Use different syntax for object printing to avoid confusion with arrays.
- Print null as `<null>` to avoid confusion with a string `"null"`.
- Display `<empty>` in editor resource pickers to avoid confusion
  with array-based properties.
This commit is contained in:
Hugo Locurcio
2022-08-31 15:31:49 +02:00
parent de5f13e935
commit 291d3aaabe
8 changed files with 13 additions and 13 deletions
+1 -1
View File
@@ -1319,7 +1319,7 @@ void godotsharp_object_to_string(Object *p_ptr, godot_string *r_str) {
#endif
// Can't call 'Object::to_string()' here, as that can end up calling 'ToString' again resulting in an endless circular loop.
memnew_placement(r_str,
String("[" + p_ptr->get_class() + ":" + itos(p_ptr->get_instance_id()) + "]"));
String("<" + p_ptr->get_class() + "#" + itos(p_ptr->get_instance_id()) + ">"));
}
#ifdef __cplusplus