Skip to content

Commit

Permalink
Revert "refine"
Browse files Browse the repository at this point in the history
This reverts commit 055004c.
  • Loading branch information
bofeng-song committed Dec 11, 2024
1 parent 8f9a064 commit e3aa9fa
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions native/cocos/editor-support/spine-wasm/spine-wasm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,19 @@
#include "util-function.h"
#include "wasmSpineExtension.h"

#include <emscripten/emscripten.h>
#include <emscripten/val.h>

#include "spine/HashMap.h"

using namespace spine;

static void logToConsole(const char* message) {
EM_ASM({
console.log(UTF8ToString($0));
}, message);
}

namespace {
HashMap<String, SkeletonData*> skeletonDataMap{};

Expand Down Expand Up @@ -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());
}
}
}
Expand Down

0 comments on commit e3aa9fa

Please sign in to comment.