Add _to_string method to extension classes.

So printing them in Godot shows the proper class name instead of
"Wrapped".
This commit is contained in:
Fabio Alessandrelli
2023-12-19 12:01:54 +01:00
parent cf23e5e740
commit fb2c9c3687
2 changed files with 8 additions and 0 deletions

View File

@@ -74,6 +74,10 @@ private:
protected:
static void _bind_methods() {}
godot::String _to_string() const {
return "WebRTCLibDataChannel";
}
public:
static WebRTCLibDataChannel *new_data_channel(std::shared_ptr<rtc::DataChannel> p_channel, bool p_negotiated);

View File

@@ -67,6 +67,10 @@ private:
protected:
static void _bind_methods() {}
godot::String _to_string() const {
return "WebRTCLibPeerConnection";
}
public:
static void _register_methods() {}
static void initialize_signaling();