浏览代码

Merge pull request #42093 from Xrayez/virtual-to_string

Make `Object::to_string` virtual
Rémi Verschelde 5 年之前
父节点
当前提交
7f0352b4d1
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      core/object.h

+ 1 - 1
core/object.h

@@ -658,7 +658,7 @@ public:
 	Variant call(const StringName &p_name, VARIANT_ARG_LIST); // C++ helper
 	Variant call(const StringName &p_name, VARIANT_ARG_LIST); // C++ helper
 
 
 	void notification(int p_notification, bool p_reversed = false);
 	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
 	//used mainly by script, get and set all INCLUDING string
 	virtual Variant getvar(const Variant &p_key, bool *r_valid = nullptr) const;
 	virtual Variant getvar(const Variant &p_key, bool *r_valid = nullptr) const;