|
@@ -31,11 +31,14 @@
|
|
|
#include "register_types.h"
|
|
|
|
|
|
#include "core/config/project_settings.h"
|
|
|
+#include "core/debugger/engine_debugger.h"
|
|
|
#include "core/error/error_macros.h"
|
|
|
|
|
|
#include "websocket_multiplayer_peer.h"
|
|
|
#include "websocket_peer.h"
|
|
|
|
|
|
+#include "remote_debugger_peer_websocket.h"
|
|
|
+
|
|
|
#ifdef WEB_ENABLED
|
|
|
#include "emws_peer.h"
|
|
|
#else
|
|
@@ -55,7 +58,7 @@ static void _editor_init_callback() {
|
|
|
#endif
|
|
|
|
|
|
void initialize_websocket_module(ModuleInitializationLevel p_level) {
|
|
|
- if (p_level == MODULE_INITIALIZATION_LEVEL_SCENE) {
|
|
|
+ if (p_level == MODULE_INITIALIZATION_LEVEL_CORE) {
|
|
|
#ifdef WEB_ENABLED
|
|
|
EMWSPeer::initialize();
|
|
|
#else
|
|
@@ -64,6 +67,9 @@ void initialize_websocket_module(ModuleInitializationLevel p_level) {
|
|
|
|
|
|
GDREGISTER_CLASS(WebSocketMultiplayerPeer);
|
|
|
ClassDB::register_custom_instance_class<WebSocketPeer>();
|
|
|
+
|
|
|
+ EngineDebugger::register_uri_handler("ws://", RemoteDebuggerPeerWebSocket::create);
|
|
|
+ EngineDebugger::register_uri_handler("wss://", RemoteDebuggerPeerWebSocket::create);
|
|
|
}
|
|
|
|
|
|
#ifdef TOOLS_ENABLED
|
|
@@ -74,7 +80,7 @@ void initialize_websocket_module(ModuleInitializationLevel p_level) {
|
|
|
}
|
|
|
|
|
|
void uninitialize_websocket_module(ModuleInitializationLevel p_level) {
|
|
|
- if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) {
|
|
|
+ if (p_level != MODULE_INITIALIZATION_LEVEL_CORE) {
|
|
|
return;
|
|
|
}
|
|
|
#ifndef WEB_ENABLED
|