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()`
This commit is contained in:
@ -658,6 +658,7 @@ public:
|
||||
void call_multilevel(const StringName &p_name, VARIANT_ARG_LIST); // C++ helper
|
||||
|
||||
void notification(int p_notification, bool p_reversed = false);
|
||||
String to_string();
|
||||
|
||||
//used mainly by script, get and set all INCLUDING string
|
||||
virtual Variant getvar(const Variant &p_key, bool *r_valid = NULL) const;
|
||||
|
||||
Reference in New Issue
Block a user