Removed write of every packet

This commit is contained in:
2026-03-13 17:20:05 +01:00
parent 4e9651b08b
commit 7686341107
3 changed files with 15 additions and 11 deletions

View File

@@ -51,8 +51,6 @@ exports.CameraUnityStateColors = exports.UnityWebSocket = void 0;
var ws_1 = require("ws"); var ws_1 = require("ws");
var Utils_1 = require("../Utils"); var Utils_1 = require("../Utils");
var Status_1 = require("../Status"); var Status_1 = require("../Status");
var path_1 = require("path");
var fs_extra_1 = require("fs-extra");
var PREFIX = '[Unity]'; var PREFIX = '[Unity]';
var UnityWebSocket = /** @class */ (function () { var UnityWebSocket = /** @class */ (function () {
function UnityWebSocket(Main) { function UnityWebSocket(Main) {
@@ -235,7 +233,13 @@ var UnityWebSocket = /** @class */ (function () {
catch (error) { catch (error) {
return; return;
} }
(0, fs_extra_1.writeFileSync)((0, path_1.join)(this._Main.dataPath, "tempdebug-".concat(message.type, "-").concat(new Date().getTime(), ".json")), JSON.stringify(message, null, 4)); // writeFileSync(
// join(
// this._Main.dataPath,
// `tempdebug-${message.type}-${new Date().getTime()}.json`,
// ),
// JSON.stringify(message, null, 4),
// );
switch (message.type) { switch (message.type) {
case 'heartbeat_data': case 'heartbeat_data':
this.parameters.timelineWatching = this.parameters.timelineWatching =

File diff suppressed because one or more lines are too long

View File

@@ -246,13 +246,13 @@ export class UnityWebSocket {
return; return;
} }
writeFileSync( // writeFileSync(
join( // join(
this._Main.dataPath, // this._Main.dataPath,
`tempdebug-${message.type}-${new Date().getTime()}.json`, // `tempdebug-${message.type}-${new Date().getTime()}.json`,
), // ),
JSON.stringify(message, null, 4), // JSON.stringify(message, null, 4),
); // );
switch (message.type) { switch (message.type) {
case 'heartbeat_data': case 'heartbeat_data':