summaryrefslogtreecommitdiffstats
path: root/modules/mono/glue/gd_glue.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2018-10-29 23:41:37 +0100
committerGitHub <noreply@github.com>2018-10-29 23:41:37 +0100
commit4fb35520fbbcc0bb2f9a3549ee4b69e60dd5dda0 (patch)
tree6960d73e5f3cd6e7c161063eb8f8d9df3931feee /modules/mono/glue/gd_glue.cpp
parent7771fe5d4a0051b5bbff62fe3de989cc05591ba6 (diff)
parentf2476f8a7c2faf9842da8cbd19a7783c1e52b7a1 (diff)
downloadredot-engine-4fb35520fbbcc0bb2f9a3549ee4b69e60dd5dda0.tar.gz
Merge pull request #23345 from zorbathut/brogwilhelm/logfunctions/cs
Add new log functions for C#.
Diffstat (limited to 'modules/mono/glue/gd_glue.cpp')
-rw-r--r--modules/mono/glue/gd_glue.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/modules/mono/glue/gd_glue.cpp b/modules/mono/glue/gd_glue.cpp
index 051f42b966..6a5430489e 100644
--- a/modules/mono/glue/gd_glue.cpp
+++ b/modules/mono/glue/gd_glue.cpp
@@ -157,6 +157,14 @@ bool godot_icall_GD_type_exists(MonoString *p_type) {
return ClassDB::class_exists(GDMonoMarshal::mono_string_to_godot(p_type));
}
+void godot_icall_GD_logerror(MonoString *p_str) {
+ ERR_PRINTS(GDMonoMarshal::mono_string_to_godot(p_str));
+}
+
+void godot_icall_GD_logwarning(MonoString *p_str) {
+ WARN_PRINTS(GDMonoMarshal::mono_string_to_godot(p_str));
+}
+
MonoArray *godot_icall_GD_var2bytes(MonoObject *p_var) {
Variant var = GDMonoMarshal::mono_object_to_variant(p_var);
@@ -186,6 +194,8 @@ void godot_register_gd_icalls() {
mono_add_internal_call("Godot.GD::godot_icall_GD_convert", (void *)godot_icall_GD_convert);
mono_add_internal_call("Godot.GD::godot_icall_GD_hash", (void *)godot_icall_GD_hash);
mono_add_internal_call("Godot.GD::godot_icall_GD_instance_from_id", (void *)godot_icall_GD_instance_from_id);
+ mono_add_internal_call("Godot.GD::godot_icall_GD_logerror", (void *)godot_icall_GD_logerror);
+ mono_add_internal_call("Godot.GD::godot_icall_GD_logwarning", (void *)godot_icall_GD_logwarning);
mono_add_internal_call("Godot.GD::godot_icall_GD_print", (void *)godot_icall_GD_print);
mono_add_internal_call("Godot.GD::godot_icall_GD_printerr", (void *)godot_icall_GD_printerr);
mono_add_internal_call("Godot.GD::godot_icall_GD_printraw", (void *)godot_icall_GD_printraw);