@@ -42,8 +39,17 @@ Editor.Panel.extend({
+
+
+
+
+
+
-
+
+
+
+
@@ -61,12 +67,16 @@ Editor.Panel.extend({
thread_custom_checkbox: '#tcc',
thread_http: '#th',
thread_http_checkbox: '#thc',
+ thread_ws: '#tw',
+ thread_ws_checkbox: '#twc',
thread_audio_system: '#fs',
thread_audio_system_checkbox: '#fsc',
thread_audio_system_interval: '#fsi',
thread_audio_system_interval_input: '#fsii',
thread_scheduler: '#ts',
thread_scheduler_checkbox: '#tsc',
+ thread_subpackage: '#tsp',
+ thread_subpackage_checkbox: '#tspc',
},
ready() {
@@ -87,6 +97,8 @@ Editor.Panel.extend({
this.$thread_audio_system_checkbox.checked = data.CC_WORKER_AUDIO_SYSTEM;
this.$thread_audio_system_interval_input.value = data.CC_WORKER_AUDIO_SYSTEM_SYNC_INTERVAL;
this.$thread_http_checkbox.checked = data.CC_WORKER_HTTP_REQUEST;
+ this.$thread_ws_checkbox.checked = data.CC_WORKER_WEBSOCKET;
+ this.$thread_subpackage_checkbox.checked = data.CC_WORKER_SUB_PACKAGE;
this.$thread_scheduler_checkbox.checked = data.CC_WORKER_SCHEDULER;
this.$thread_debug_checkbox.addEventListener('change', () => {
@@ -105,6 +117,14 @@ Editor.Panel.extend({
this.setSettings("CC_WORKER_HTTP_REQUEST", this.$thread_http_checkbox.checked);
});
+ this.$thread_ws_checkbox.addEventListener('change', () => {
+ this.setSettings("CC_WORKER_WEBSOCKET", this.$thread_ws_checkbox.checked);
+ });
+
+ this.$thread_subpackage_checkbox.addEventListener('change', () => {
+ this.setSettings("CC_WORKER_SUB_PACKAGE", this.$thread_subpackage_checkbox.checked);
+ });
+
const onAudioSystemEnableChange = (enabled) => {
this.$thread_audio_system_interval_input.disabled = !enabled;
};
diff --git a/extension/templates/2.4.13/2.3.0/worker/creator-worker.d.ts b/extension/templates/2.4.13/2.3.0/worker/creator-worker.d.ts
index 726c976d..f21ad769 100644
--- a/extension/templates/2.4.13/2.3.0/worker/creator-worker.d.ts
+++ b/extension/templates/2.4.13/2.3.0/worker/creator-worker.d.ts
@@ -74,3 +74,8 @@ declare var CC_WORKER_AUDIO_SYSTEM_SYNC_INTERVAL: number;
* 是否启用 Worker 驱动 HTTP 请求
*/
declare var CC_WORKER_HTTP_REQUEST: boolean;
+
+/**
+ * 是否启用 Worker 驱动 WebSocket
+ */
+declare var CC_WORKER_WEBSOCKET: boolean;