From 9d3b8048e1658718968db204a9e7ac62fb32f511 Mon Sep 17 00:00:00 2001 From: bofeng Date: Fri, 6 Dec 2024 15:13:25 +0800 Subject: [PATCH] refine --- cocos/spine/skeleton-data.ts | 2 +- .../editor-support/spine-wasm/spine-skeleton-instance.cpp | 4 ++-- .../cocos/editor-support/spine-wasm/spine-skeleton-instance.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cocos/spine/skeleton-data.ts b/cocos/spine/skeleton-data.ts index e3d0b78ad8b..5378b51d70e 100644 --- a/cocos/spine/skeleton-data.ts +++ b/cocos/spine/skeleton-data.ts @@ -214,7 +214,7 @@ export class SkeletonData extends Asset { this._skeletonCache = spData; } else { const size = this.textures.length; - const textureUUIDs = [] as string[]; + const textureUUIDs: string[] = []; for (let i = 0; i < size; ++i) { textureUUIDs.push(this.textures[i].uuid); } diff --git a/native/cocos/editor-support/spine-wasm/spine-skeleton-instance.cpp b/native/cocos/editor-support/spine-wasm/spine-skeleton-instance.cpp index bebcf166fe2..48d60da09e3 100644 --- a/native/cocos/editor-support/spine-wasm/spine-skeleton-instance.cpp +++ b/native/cocos/editor-support/spine-wasm/spine-skeleton-instance.cpp @@ -503,11 +503,11 @@ void SpineSkeletonInstance::resizeSlotRegion(const spine::String &slotName, uint } } -void SpineSkeletonInstance::setSlotTexture(const spine::String &slotName, const spine::String& textureID) { +void SpineSkeletonInstance::setSlotTexture(const spine::String &slotName, const spine::String& textureUuid) { if (!_skeleton) return; auto* slot = _skeleton->findSlot(slotName); if (!slot) return; _userData.useSlotTexture = true; - _slotTextureSet.put(slot, textureID); + _slotTextureSet.put(slot, textureUuid); } \ No newline at end of file diff --git a/native/cocos/editor-support/spine-wasm/spine-skeleton-instance.h b/native/cocos/editor-support/spine-wasm/spine-skeleton-instance.h index a8ff816f6ae..f370bd1932c 100644 --- a/native/cocos/editor-support/spine-wasm/spine-skeleton-instance.h +++ b/native/cocos/editor-support/spine-wasm/spine-skeleton-instance.h @@ -54,7 +54,7 @@ class SpineSkeletonInstance { void onTrackEntryEvent(spine::TrackEntry *entry, spine::EventType type, spine::Event *event); inline spine::Vector &getDebugShapes() { return _debugShapes; } void resizeSlotRegion(const spine::String &slotName, uint32_t width, uint32_t height, bool createNew = false); - void setSlotTexture(const spine::String &slotName, const spine::String& textureID); + void setSlotTexture(const spine::String &slotName, const spine::String& textureUuid); void destroy(); bool isCache{false}; bool enable{true};