diff options
author | Andrii Doroshenko (Xrayez) <xrayez@gmail.com> | 2020-09-15 18:14:45 +0300 |
---|---|---|
committer | Andrii Doroshenko (Xrayez) <xrayez@gmail.com> | 2020-09-15 18:14:45 +0300 |
commit | cfead57d1dcec669b9c4354d0b48c71281e0e26f (patch) | |
tree | c0204613aeecd8c6b6b8a49cd246fd74aa1e71f1 /core/object.h | |
parent | 3f5f087af2e874dddf890ab09a28c80ade921ee8 (diff) |
Make `Object::to_string` virtual
Allows to override printing via C++, not only via script.
Diffstat (limited to 'core/object.h')
-rw-r--r-- | core/object.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/object.h b/core/object.h index f9a12da8f6..12ef600dfc 100644 --- a/core/object.h +++ b/core/object.h @@ -658,7 +658,7 @@ public: Variant call(const StringName &p_name, VARIANT_ARG_LIST); // C++ helper void notification(int p_notification, bool p_reversed = false); - String to_string(); + virtual String to_string(); //used mainly by script, get and set all INCLUDING string virtual Variant getvar(const Variant &p_key, bool *r_valid = nullptr) const; |