diff --git a/cocos/spine/skeleton-data.ts b/cocos/spine/skeleton-data.ts index cc5bfb69367..2b9e21ba241 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; - let textureUUIDs = [] as string[]; + const textureUUIDs = [] as 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 8cf8222c77d..bebcf166fe2 100644 --- a/native/cocos/editor-support/spine-wasm/spine-skeleton-instance.cpp +++ b/native/cocos/editor-support/spine-wasm/spine-skeleton-instance.cpp @@ -503,7 +503,7 @@ void SpineSkeletonInstance::resizeSlotRegion(const spine::String &slotName, uint } } -void SpineSkeletonInstance::setSlotTexture(const spine::String &slotName, spine::String textureID) { +void SpineSkeletonInstance::setSlotTexture(const spine::String &slotName, const spine::String& textureID) { if (!_skeleton) return; auto* slot = _skeleton->findSlot(slotName); if (!slot) return; 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 1fbc7a95a16..a8ff816f6ae 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, spine::String textureID); + void setSlotTexture(const spine::String &slotName, const spine::String& textureID); void destroy(); bool isCache{false}; bool enable{true};