From 0ffda6e6a83037920fabb396a3f36e5df086130d Mon Sep 17 00:00:00 2001 From: bofeng Date: Fri, 6 Dec 2024 14:34:12 +0800 Subject: [PATCH] Revert "refine" This reverts commit 055004ced2bfd9b879e489e2cdf04e82793f2a83. --- .../cocos/editor-support/spine-wasm/spine-wasm.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/native/cocos/editor-support/spine-wasm/spine-wasm.cpp b/native/cocos/editor-support/spine-wasm/spine-wasm.cpp index 204731fde91..1f8a4eeeac4 100644 --- a/native/cocos/editor-support/spine-wasm/spine-wasm.cpp +++ b/native/cocos/editor-support/spine-wasm/spine-wasm.cpp @@ -4,10 +4,19 @@ #include "util-function.h" #include "wasmSpineExtension.h" +#include +#include + #include "spine/HashMap.h" using namespace spine; +static void logToConsole(const char* message) { + EM_ASM({ + console.log(UTF8ToString($0)); + }, message); +} + namespace { HashMap skeletonDataMap{}; @@ -39,9 +48,9 @@ namespace { attachmentVertices->_textureId = textureMap[textureName]; } else { spine::String logInfo(attachment->getName()); - logInfo.append(" attachment's texture does not exist "); + logInfo.append(" attachment's texture is not exist "); logInfo.append(textureName); - printf("%s\n", logInfo.buffer()); + logToConsole(logInfo.buffer()); } } }