diff options
author | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2023-12-19 12:01:54 +0100 |
---|---|---|
committer | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2023-12-19 12:01:54 +0100 |
commit | fb2c9c3687342240dd2f2fb10bfdd93da046cd5a (patch) | |
tree | 3042547b1e38b63ff7d3b62c3d361af4c82d0a6a /src/WebRTCLibDataChannel.hpp | |
parent | cf23e5e74038249e6c050c5610db108efd86ae85 (diff) | |
download | fork-godot-webrtc-native-fb2c9c3687342240dd2f2fb10bfdd93da046cd5a.tar.gz fork-godot-webrtc-native-fb2c9c3687342240dd2f2fb10bfdd93da046cd5a.tar.bz2 fork-godot-webrtc-native-fb2c9c3687342240dd2f2fb10bfdd93da046cd5a.zip |
Add _to_string method to extension classes.
So printing them in Godot shows the proper class name instead of
"Wrapped".
Diffstat (limited to 'src/WebRTCLibDataChannel.hpp')
-rw-r--r-- | src/WebRTCLibDataChannel.hpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/WebRTCLibDataChannel.hpp b/src/WebRTCLibDataChannel.hpp index 1c69997..3524e02 100644 --- a/src/WebRTCLibDataChannel.hpp +++ b/src/WebRTCLibDataChannel.hpp @@ -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); |