Make `Object::to_string` virtual

Allows to override printing via C++, not only via script.
This commit is contained in:
Andrii Doroshenko (Xrayez) 2020-09-15 18:14:45 +03:00
parent 3f5f087af2
commit cfead57d1d
1 changed files with 1 additions and 1 deletions

View File

@ -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;