From 5ee3fb103eac45633b56e870a70e03bfcf0ee005 Mon Sep 17 00:00:00 2001 From: bofeng Date: Thu, 12 Dec 2024 10:23:46 +0800 Subject: [PATCH] refine --- cocos/spine/skeleton.ts | 4 ++-- .../spine-wasm/AtlasAttachmentLoaderExtension.cpp | 4 ++-- .../spine-wasm/AtlasAttachmentLoaderExtension.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cocos/spine/skeleton.ts b/cocos/spine/skeleton.ts index 97a52470a69..85f6bf70a45 100644 --- a/cocos/spine/skeleton.ts +++ b/cocos/spine/skeleton.ts @@ -1166,10 +1166,10 @@ export class Skeleton extends UIRenderer { /** * @engineInternal */ - public requestDrawData (material: Material, textureID: string, indexOffset: number, indexCount: number): SkeletonDrawData { + public requestDrawData (material: Material, textureUUID: string, indexOffset: number, indexCount: number): SkeletonDrawData { const draw = this._drawList.add(); draw.material = material; - draw.texture = assetManager.assets.get(textureID) as Texture2D; + draw.texture = assetManager.assets.get(textureUUID) as Texture2D; draw.indexOffset = indexOffset; draw.indexCount = indexCount; return draw; diff --git a/native/cocos/editor-support/spine-wasm/AtlasAttachmentLoaderExtension.cpp b/native/cocos/editor-support/spine-wasm/AtlasAttachmentLoaderExtension.cpp index ac1513da56d..f41e3d92dd4 100644 --- a/native/cocos/editor-support/spine-wasm/AtlasAttachmentLoaderExtension.cpp +++ b/native/cocos/editor-support/spine-wasm/AtlasAttachmentLoaderExtension.cpp @@ -5,13 +5,13 @@ using namespace spine; static uint16_t quadTriangles[6] = {0, 1, 2, 2, 3, 0}; -AttachmentVertices::AttachmentVertices(int verticesCount, uint16_t *triangles, int trianglesCount, const spine::String& textureId) { +AttachmentVertices::AttachmentVertices(int verticesCount, uint16_t *triangles, int trianglesCount, const spine::String& textureUUID) { _triangles = new Triangles(); _triangles->verts = new V3F_T2F_C4B[verticesCount]; _triangles->vertCount = verticesCount; _triangles->indices = triangles; _triangles->indexCount = trianglesCount; - _textureId = textureId; + _textureId = textureUUID; } AttachmentVertices::~AttachmentVertices() { diff --git a/native/cocos/editor-support/spine-wasm/AtlasAttachmentLoaderExtension.h b/native/cocos/editor-support/spine-wasm/AtlasAttachmentLoaderExtension.h index 8c2a5ddf7d5..0e6c415de3c 100644 --- a/native/cocos/editor-support/spine-wasm/AtlasAttachmentLoaderExtension.h +++ b/native/cocos/editor-support/spine-wasm/AtlasAttachmentLoaderExtension.h @@ -5,7 +5,7 @@ class AttachmentVertices { public: - AttachmentVertices(int verticesCount, uint16_t *triangles, int trianglesCount, const spine::String& textureId); + AttachmentVertices(int verticesCount, uint16_t *triangles, int trianglesCount, const spine::String& textureUUID); virtual ~AttachmentVertices(); AttachmentVertices *copy(); Triangles *_triangles = nullptr;