From f7eb426e2ebafc5598b0e43baf37d9a50cea1648 Mon Sep 17 00:00:00 2001 From: Leonard Meagher Date: Tue, 9 Apr 2019 22:07:40 -0700 Subject: Allow overriding how scripted objects are converted to strings solves #26796 - ADD `String to_string()` method to Object which can be overriden by `String _to_string()` in scripts - ADD `String to_string(r_valid)` method to ScriptInstance to allow langauges to control how scripted objects are converted to strings - IMPLEMENT to_string for GDScriptInstance, VisualScriptInstance, and NativeScriptInstance - ADD Documentation about `Object.to_string` and `Object._to_string` - Changed `Variant::operator String` to use `obj->to_string()` --- core/script_language.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'core/script_language.cpp') diff --git a/core/script_language.cpp b/core/script_language.cpp index 4a6f904f9d..97758ced66 100644 --- a/core/script_language.cpp +++ b/core/script_language.cpp @@ -30,6 +30,7 @@ #include "script_language.h" +#include "core/core_string_names.h" #include "core/project_settings.h" ScriptLanguage *ScriptServer::_languages[MAX_LANGUAGES]; -- cgit v1.2.3