You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Directly expose WebRTCPeerConnection::create_data_channel() to GDExtension
This commit is contained in:
@@ -43,14 +43,3 @@ void WebRTCPeerConnectionExtension::_bind_methods() {
|
||||
GDVIRTUAL_BIND(_poll);
|
||||
GDVIRTUAL_BIND(_close);
|
||||
}
|
||||
|
||||
Ref<WebRTCDataChannel> WebRTCPeerConnectionExtension::create_data_channel(String p_label, Dictionary p_options) {
|
||||
Object *ret = nullptr;
|
||||
if (GDVIRTUAL_CALL(_create_data_channel, p_label, p_options, ret)) {
|
||||
WebRTCDataChannel *ch = Object::cast_to<WebRTCDataChannel>(ret);
|
||||
ERR_FAIL_COND_V_MSG(ret && !ch, nullptr, "Returned object must be an instance of WebRTCDataChannel.");
|
||||
return ch;
|
||||
}
|
||||
WARN_PRINT_ONCE("WebRTCPeerConnectionExtension::_create_data_channel is unimplemented!");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user