From bc5dc2b70b8f268bdbe9bba91cf5cadbae0cd3a0 Mon Sep 17 00:00:00 2001 From: badlogic Date: Wed, 16 Jan 2019 15:57:49 +0100 Subject: [PATCH 1/4] [cpp] Resolve shadowed variables, see #1250. --- CMakeLists.txt | 4 ++-- .../spine-cpp/src/spine/DeformTimeline.cpp | 8 +++---- .../spine-cpp/src/spine/IkConstraint.cpp | 2 +- spine-cpp/spine-cpp/src/spine/RTTI.cpp | 2 +- spine-cpp/spine-cpp/src/spine/Skeleton.cpp | 3 ++- .../spine-cpp/src/spine/SkeletonBinary.cpp | 10 ++++---- .../spine-cpp/src/spine/SkeletonJson.cpp | 23 ++++++++++--------- spine-sfml/cpp/src/spine/spine-sfml.cpp | 8 +++---- 8 files changed, 31 insertions(+), 29 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cd7637280..f3b7f35cf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,8 +6,8 @@ if(MSVC) set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") set (CMAKE_C_FLAGS "${CMAKE_CXX_FLAGS}") else() - set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -pedantic -std=c89") - set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wnon-virtual-dtor -pedantic -std=c++03 -fno-exceptions -fno-rtti") + set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -pedantic -Wshadow -std=c89") + set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wnon-virtual-dtor -pedantic -Wshadow -std=c++03 -fno-exceptions -fno-rtti") endif() set(CMAKE_INSTALL_PREFIX "./") diff --git a/spine-cpp/spine-cpp/src/spine/DeformTimeline.cpp b/spine-cpp/spine-cpp/src/spine/DeformTimeline.cpp index 37ca544f8..de62f9e65 100644 --- a/spine-cpp/spine-cpp/src/spine/DeformTimeline.cpp +++ b/spine-cpp/spine-cpp/src/spine/DeformTimeline.cpp @@ -74,8 +74,8 @@ void DeformTimeline::apply(Skeleton &skeleton, float lastTime, float time, Vecto return; } - VertexAttachment *vertexAttachment = static_cast(slotAttachment); - if (!vertexAttachment->applyDeform(_attachment)) { + VertexAttachment *attachment = static_cast(slotAttachment); + if (!attachment->applyDeform(_attachment)) { return; } @@ -100,9 +100,9 @@ void DeformTimeline::apply(Skeleton &skeleton, float lastTime, float time, Vecto } verticesArray.setSize(vertexCount, 0); Vector &vertices = verticesArray; - if (vertexAttachment->getBones().size() == 0) { + if (attachment->getBones().size() == 0) { // Unweighted vertex positions. - Vector &setupVertices = vertexAttachment->getVertices(); + Vector &setupVertices = attachment->getVertices(); for (size_t i = 0; i < vertexCount; i++) vertices[i] += (setupVertices[i] - vertices[i]) * alpha; } else { diff --git a/spine-cpp/spine-cpp/src/spine/IkConstraint.cpp b/spine-cpp/spine-cpp/src/spine/IkConstraint.cpp index a32c12953..1c2237e62 100644 --- a/spine-cpp/spine-cpp/src/spine/IkConstraint.cpp +++ b/spine-cpp/spine-cpp/src/spine/IkConstraint.cpp @@ -60,7 +60,7 @@ void IkConstraint::apply(Bone &bone, float targetX, float targetY, bool compress float sy = bone._ascaleY; if (compress || stretch) { float b = bone._data.getLength() * sx, dd = MathUtil::sqrt(tx * tx + ty * ty); - if ((compress && dd < b) || (stretch && dd > b) && b > 0.0001f) { + if (((compress && dd < b) || (stretch && dd > b)) && (b > 0.0001f)) { float s = (dd / b - 1) * alpha + 1; sx *= s; if (uniform) sy *= s; diff --git a/spine-cpp/spine-cpp/src/spine/RTTI.cpp b/spine-cpp/spine-cpp/src/spine/RTTI.cpp index e7fec06bb..0822ebc72 100644 --- a/spine-cpp/spine-cpp/src/spine/RTTI.cpp +++ b/spine-cpp/spine-cpp/src/spine/RTTI.cpp @@ -63,4 +63,4 @@ bool RTTI::instanceOf(const RTTI &rtti) const { } return false; -} \ No newline at end of file +} diff --git a/spine-cpp/spine-cpp/src/spine/Skeleton.cpp b/spine-cpp/spine-cpp/src/spine/Skeleton.cpp index 33550e702..c8772d14c 100644 --- a/spine-cpp/spine-cpp/src/spine/Skeleton.cpp +++ b/spine-cpp/spine-cpp/src/spine/Skeleton.cpp @@ -176,7 +176,8 @@ void Skeleton::updateCache() { } } - for (size_t i = 0, n = _bones.size(); i < n; ++i) { + size_t n = _bones.size(); + for (i = 0; i < n; ++i) { sortBone(_bones[i]); } } diff --git a/spine-cpp/spine-cpp/src/spine/SkeletonBinary.cpp b/spine-cpp/spine-cpp/src/spine/SkeletonBinary.cpp index 5ceb029bc..7dafcdad2 100644 --- a/spine-cpp/spine-cpp/src/spine/SkeletonBinary.cpp +++ b/spine-cpp/spine-cpp/src/spine/SkeletonBinary.cpp @@ -144,9 +144,9 @@ SkeletonData *SkeletonBinary::readSkeletonData(const unsigned char *binary, cons } /* Bones. */ - int bonesCount = readVarint(input, true); - skeletonData->_bones.setSize(bonesCount, 0); - for (int i = 0; i < bonesCount; ++i) { + int numBones = readVarint(input, true); + skeletonData->_bones.setSize(numBones, 0); + for (int i = 0; i < numBones; ++i) { const char *name = readString(input); BoneData *parent = i == 0 ? 0 : skeletonData->_bones[readVarint(input, true)]; BoneData *data = new(__FILE__, __LINE__) BoneData(i, String(name, true), parent); @@ -916,8 +916,8 @@ Animation *SkeletonBinary::readAnimation(const String &name, DataInput *input, S if (end == 0) { if (weighted) { deform.setSize(deformLength, 0); - for (size_t i = 0; i < deformLength; ++i) { - deform[i] = 0; + for (size_t iiii = 0; iiii < deformLength; ++iiii) { + deform[iiii] = 0; } } else { deform.clearAndAddAll(vertices); diff --git a/spine-cpp/spine-cpp/src/spine/SkeletonJson.cpp b/spine-cpp/spine-cpp/src/spine/SkeletonJson.cpp index 9dfd527d3..3edb0deda 100644 --- a/spine-cpp/spine-cpp/src/spine/SkeletonJson.cpp +++ b/spine-cpp/spine-cpp/src/spine/SkeletonJson.cpp @@ -643,7 +643,8 @@ SkeletonData *SkeletonJson::readSkeletonData(const char *json) { } /* Linked meshes. */ - for (int i = 0, n = _linkedMeshes.size(); i < n; ++i) { + int n = _linkedMeshes.size(); + for (i = 0; i < n; ++i) { LinkedMesh *linkedMesh = _linkedMeshes[i]; Skin *skin = linkedMesh->_skin.length() == 0 ? skeletonData->getDefaultSkin() : skeletonData->findSkin( linkedMesh->_skin); @@ -1062,8 +1063,8 @@ Animation *SkeletonJson::readAnimation(Json *root, SkeletonData *skeletonData) { VertexAttachment *attachment = static_cast(baseAttachment); weighted = attachment->_bones.size() != 0; - Vector &vertices = attachment->_vertices; - deformLength = weighted ? vertices.size() / 3 * 2 : vertices.size(); + Vector &verts = attachment->_vertices; + deformLength = weighted ? verts.size() / 3 * 2 : verts.size(); timeline = new(__FILE__, __LINE__) DeformTimeline(timelineMap->_size); @@ -1072,34 +1073,34 @@ Animation *SkeletonJson::readAnimation(Json *root, SkeletonData *skeletonData) { for (valueMap = timelineMap->_child, frameIndex = 0; valueMap; valueMap = valueMap->_next, ++frameIndex) { Json *vertices = Json::getItem(valueMap, "vertices"); - Vector deform; + Vector deformed; if (!vertices) { if (weighted) { - deform.setSize(deformLength, 0); + deformed.setSize(deformLength, 0); } else { - deform.clearAndAddAll(attachment->_vertices); + deformed.clearAndAddAll(attachment->_vertices); } } else { int v, start = Json::getInt(valueMap, "offset", 0); Json *vertex; - deform.setSize(deformLength, 0); + deformed.setSize(deformLength, 0); if (_scale == 1) { for (vertex = vertices->_child, v = start; vertex; vertex = vertex->_next, ++v) { - deform[v] = vertex->_valueFloat; + deformed[v] = vertex->_valueFloat; } } else { for (vertex = vertices->_child, v = start; vertex; vertex = vertex->_next, ++v) { - deform[v] = vertex->_valueFloat * _scale; + deformed[v] = vertex->_valueFloat * _scale; } } if (!weighted) { Vector &verticesAttachment = attachment->_vertices; for (v = 0; v < deformLength; ++v) { - deform[v] += verticesAttachment[v]; + deformed[v] += verticesAttachment[v]; } } } - timeline->setFrame(frameIndex, Json::getFloat(valueMap, "time", 0), deform); + timeline->setFrame(frameIndex, Json::getFloat(valueMap, "time", 0), deformed); readCurve(valueMap, timeline, frameIndex); } diff --git a/spine-sfml/cpp/src/spine/spine-sfml.cpp b/spine-sfml/cpp/src/spine/spine-sfml.cpp index 32ad83b33..ec54ee1f6 100644 --- a/spine-sfml/cpp/src/spine/spine-sfml.cpp +++ b/spine-sfml/cpp/src/spine/spine-sfml.cpp @@ -233,11 +233,11 @@ void SkeletonDrawable::draw(RenderTarget &target, RenderStates states) const { if (vertexEffect != 0) { tempUvs.clear(); tempColors.clear(); - for (int i = 0; i < verticesCount; i++) { + for (int ii = 0; ii < verticesCount; ii++) { Color vertexColor = light; Color dark; dark.r = dark.g = dark.b = dark.a = 0; - int index = i << 1; + int index = ii << 1; float x = (*vertices)[index]; float y = (*vertices)[index + 1]; float u = (*uvs)[index]; @@ -250,8 +250,8 @@ void SkeletonDrawable::draw(RenderTarget &target, RenderStates states) const { tempColors.add(vertexColor); } - for (int i = 0; i < indicesCount; ++i) { - int index = (*indices)[i] << 1; + for (int ii = 0; ii < indicesCount; ++ii) { + int index = (*indices)[ii] << 1; vertex.position.x = (*vertices)[index]; vertex.position.y = (*vertices)[index + 1]; vertex.texCoords.x = (*uvs)[index] * size.x; From ca2313047e99217792f559e69901d55efc1bc382 Mon Sep 17 00:00:00 2001 From: Harald Csaszar Date: Wed, 16 Jan 2019 17:07:11 +0100 Subject: [PATCH 2/4] [unity] Fixed removing unreferenced SlotBlendMode material entries, closes #1249. --- .../Modules/SlotBlendModes/SlotBlendModes.cs | 128 ++++++++++++++---- 1 file changed, 100 insertions(+), 28 deletions(-) diff --git a/spine-unity/Assets/Spine/Runtime/spine-unity/Modules/SlotBlendModes/SlotBlendModes.cs b/spine-unity/Assets/Spine/Runtime/spine-unity/Modules/SlotBlendModes/SlotBlendModes.cs index 567b0625d..2e2a56c35 100644 --- a/spine-unity/Assets/Spine/Runtime/spine-unity/Modules/SlotBlendModes/SlotBlendModes.cs +++ b/spine-unity/Assets/Spine/Runtime/spine-unity/Modules/SlotBlendModes/SlotBlendModes.cs @@ -42,28 +42,70 @@ namespace Spine.Unity.Modules { public Material material; } - static Dictionary materialTable; - internal static Dictionary MaterialTable { + internal class MaterialWithRefcount { + public Material materialClone; + public int refcount = 1; + + public MaterialWithRefcount(Material mat) { + this.materialClone = mat; + } + } + static Dictionary materialTable; + internal static Dictionary MaterialTable { get { - if (materialTable == null) materialTable = new Dictionary(); + if (materialTable == null) materialTable = new Dictionary(); return materialTable; } } - internal static Material GetMaterialFor (Material materialSource, Texture2D texture) { + internal struct SlotMaterialTextureTuple { + public Slot slot; + public Texture2D texture2D; + public Material material; + + public SlotMaterialTextureTuple(Slot slot, Material material, Texture2D texture) { + this.slot = slot; + this.material = material; + this.texture2D = texture; + } + } + + internal static Material GetOrAddMaterialFor(Material materialSource, Texture2D texture) { if (materialSource == null || texture == null) return null; var mt = SlotBlendModes.MaterialTable; - Material m; + MaterialWithRefcount matWithRefcount; var key = new MaterialTexturePair { material = materialSource, texture2D = texture }; - if (!mt.TryGetValue(key, out m)) { - m = new Material(materialSource); + if (!mt.TryGetValue(key, out matWithRefcount)) { + matWithRefcount = new MaterialWithRefcount(new Material(materialSource)); + var m = matWithRefcount.materialClone; m.name = "(Clone)" + texture.name + "-" + materialSource.name; m.mainTexture = texture; - mt[key] = m; + mt[key] = matWithRefcount; } + else { + matWithRefcount.refcount++; + } + return matWithRefcount.materialClone; + } - return m; + internal static MaterialWithRefcount GetExistingMaterialFor(Material materialSource, Texture2D texture) + { + if (materialSource == null || texture == null) return null; + + var mt = SlotBlendModes.MaterialTable; + MaterialWithRefcount matWithRefcount; + var key = new MaterialTexturePair { material = materialSource, texture2D = texture }; + if (!mt.TryGetValue(key, out matWithRefcount)) { + return null; + } + return matWithRefcount; + } + + internal static void RemoveMaterialFromTable(Material materialSource, Texture2D texture) { + var mt = SlotBlendModes.MaterialTable; + var key = new MaterialTexturePair { material = materialSource, texture2D = texture }; + mt.Remove(key); } #endregion @@ -74,17 +116,19 @@ namespace Spine.Unity.Modules { Texture2D texture; #endregion + SlotMaterialTextureTuple[] slotsWithCustomMaterial = new SlotMaterialTextureTuple[0]; + public bool Applied { get; private set; } - void Start () { + void Start() { if (!Applied) Apply(); } - void OnDestroy () { + void OnDestroy() { if (Applied) Remove(); } - public void Apply () { + public void Apply() { GetTexture(); if (texture == null) return; @@ -93,13 +137,36 @@ namespace Spine.Unity.Modules { var slotMaterials = skeletonRenderer.CustomSlotMaterials; + int numSlotsWithCustomMaterial = 0; foreach (var s in skeletonRenderer.Skeleton.Slots) { switch (s.data.blendMode) { case BlendMode.Multiply: - if (multiplyMaterialSource != null) slotMaterials[s] = GetMaterialFor(multiplyMaterialSource, texture); + if (multiplyMaterialSource != null) { + slotMaterials[s] = GetOrAddMaterialFor(multiplyMaterialSource, texture); + ++numSlotsWithCustomMaterial; + } break; case BlendMode.Screen: - if (screenMaterialSource != null) slotMaterials[s] = GetMaterialFor(screenMaterialSource, texture); + if (screenMaterialSource != null) { + slotMaterials[s] = GetOrAddMaterialFor(screenMaterialSource, texture); + ++numSlotsWithCustomMaterial; + } + break; + } + } + slotsWithCustomMaterial = new SlotMaterialTextureTuple[numSlotsWithCustomMaterial]; + int storedSlotIndex = 0; + foreach (var s in skeletonRenderer.Skeleton.Slots) { + switch (s.data.blendMode) { + case BlendMode.Multiply: + if (multiplyMaterialSource != null) { + slotsWithCustomMaterial[storedSlotIndex++] = new SlotMaterialTextureTuple(s, multiplyMaterialSource, texture); + } + break; + case BlendMode.Screen: + if (screenMaterialSource != null) { + slotsWithCustomMaterial[storedSlotIndex++] = new SlotMaterialTextureTuple(s, screenMaterialSource, texture); + } break; } } @@ -108,7 +175,7 @@ namespace Spine.Unity.Modules { skeletonRenderer.LateUpdate(); } - public void Remove () { + public void Remove() { GetTexture(); if (texture == null) return; @@ -117,26 +184,32 @@ namespace Spine.Unity.Modules { var slotMaterials = skeletonRenderer.CustomSlotMaterials; - foreach (var s in skeletonRenderer.Skeleton.Slots) { - Material m = null; + foreach (var slotWithCustomMat in slotsWithCustomMaterial) { - switch (s.data.blendMode) { - case BlendMode.Multiply: - if (slotMaterials.TryGetValue(s, out m) && Material.ReferenceEquals(m, GetMaterialFor(multiplyMaterialSource, texture))) + Slot s = slotWithCustomMat.slot; + Material storedMaterialSource = slotWithCustomMat.material; + Texture2D storedTexture = slotWithCustomMat.texture2D; + + var matWithRefcount = GetExistingMaterialFor(storedMaterialSource, storedTexture); + if (--matWithRefcount.refcount == 0) { + RemoveMaterialFromTable(storedMaterialSource, storedTexture); + } + // we don't want to remove slotMaterials[s] if it has been changed in the meantime. + Material m; + if (slotMaterials.TryGetValue(s, out m)) { + var existingMat = matWithRefcount == null ? null : matWithRefcount.materialClone; + if (Material.ReferenceEquals(m, existingMat)) { slotMaterials.Remove(s); - break; - case BlendMode.Screen: - if (slotMaterials.TryGetValue(s, out m) && Material.ReferenceEquals(m, GetMaterialFor(screenMaterialSource, texture))) - slotMaterials.Remove(s); - break; + } } } - + slotsWithCustomMaterial = null; + Applied = false; if (skeletonRenderer.valid) skeletonRenderer.LateUpdate(); } - public void GetTexture () { + public void GetTexture() { if (texture == null) { var sr = GetComponent(); if (sr == null) return; var sda = sr.skeletonDataAsset; if (sda == null) return; @@ -146,7 +219,6 @@ namespace Spine.Unity.Modules { } } - } } From d2e9b6bab5d29ad7a4a31555d51a558779341f81 Mon Sep 17 00:00:00 2001 From: badlogic Date: Thu, 17 Jan 2019 15:45:22 +0100 Subject: [PATCH 3/4] Updated CHANGELOG. --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c535842a7..f96c1166b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -95,6 +95,7 @@ * All C structs and enums `spXXX` have been replaced with their C++ equivalents `spine::XXX` in all public interfaces. * All instantiations via `new` of C++ classes from spine-cpp should contain `(__FILE__, __LINE__)`. This allows the tracking of instantations and detection of memory leaks via the `spine::DebugExtension`. * Updated to Unreal Engine 4.20 (samples require 4.17+), see the `spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/SpinePlugin.build.cs` file on how to compile in 4.20 with the latest UBT API changes. +* Updated to Unreal Engine 4.21 (samples require 4.21). * **Breaking change**: `UBoneDriverComponent` and `UBoneFollowerComponent` are now `USceneComponent` instead of `UActorComponent`. They either update only themselves, or also the owning `UActor`, depending on whether the new flag `UseComponentTransform` is set. See https://github.com/EsotericSoftware/spine-runtimes/pull/1175 ## C# ## From 4c9ec0608384e62e153239301d02ca23c8c4eaab Mon Sep 17 00:00:00 2001 From: badlogic Date: Thu, 17 Jan 2019 16:19:12 +0100 Subject: [PATCH 4/4] [ue4] Updated sample project to require UE 4.21+. Fixed shadowing local variables. See #1250. --- .../SpinePlugin/Source/SpinePlugin/Private/SSpineWidget.cpp | 4 ++-- .../SpinePlugin/Private/SpineSkeletonAnimationComponent.cpp | 4 ++-- .../Source/SpinePlugin/Private/SpineSkeletonDataAsset.cpp | 4 ++-- .../SpinePlugin/Public/SpineSkeletonAnimationComponent.h | 2 +- spine-ue4/SpineUE4.uproject | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Private/SSpineWidget.cpp b/spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Private/SSpineWidget.cpp index e395ce152..6dcdffd53 100644 --- a/spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Private/SSpineWidget.cpp +++ b/spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Private/SSpineWidget.cpp @@ -210,7 +210,7 @@ void SSpineWidget::Flush(int32 LayerId, FSlateWindowElementList& OutDrawElements setVertex(&vertexData[i], Vertices[i].X, Vertices[i].Y, Uvs[i].X, Uvs[i].Y, Colors[i], offset); } - FSlateBrush brush; + /*FSlateBrush brush; brush.SetResourceObject(Material); brush = widget->Brush; @@ -218,7 +218,7 @@ void SSpineWidget::Flush(int32 LayerId, FSlateWindowElementList& OutDrawElements if (shaderResource) { FSlateResourceHandle resourceHandle = FSlateApplication::Get().GetRenderer()->GetResourceHandle(brush); FSlateDrawElement::MakeCustomVerts(OutDrawElements, LayerId, resourceHandle, renderData.VertexData, renderData.IndexData, nullptr, 0, 0); - } + }*/ Vertices.SetNum(0); Indices.SetNum(0); diff --git a/spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Private/SpineSkeletonAnimationComponent.cpp b/spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Private/SpineSkeletonAnimationComponent.cpp index 16a18edc7..d0e1847a2 100644 --- a/spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Private/SpineSkeletonAnimationComponent.cpp +++ b/spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Private/SpineSkeletonAnimationComponent.cpp @@ -34,8 +34,8 @@ using namespace spine; -void UTrackEntry::SetTrackEntry(TrackEntry* entry) { - this->entry = entry; +void UTrackEntry::SetTrackEntry(TrackEntry* trackEntry) { + this->entry = trackEntry; if (entry) entry->setRendererObject((void*)this); } diff --git a/spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Private/SpineSkeletonDataAsset.cpp b/spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Private/SpineSkeletonDataAsset.cpp index 3dcdfbafa..ec8a4dae3 100644 --- a/spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Private/SpineSkeletonDataAsset.cpp +++ b/spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Private/SpineSkeletonDataAsset.cpp @@ -136,8 +136,8 @@ SkeletonData* USpineSkeletonDataAsset::GetSkeletonData (Atlas* Atlas, bool Force AnimationStateData* USpineSkeletonDataAsset::GetAnimationStateData(Atlas* atlas) { if (!animationStateData) { - SkeletonData* skeletonData = GetSkeletonData(atlas, false); - animationStateData = new (__FILE__, __LINE__) AnimationStateData(skeletonData); + SkeletonData* data = GetSkeletonData(atlas, false); + animationStateData = new (__FILE__, __LINE__) AnimationStateData(data); } for (auto& data : MixData) { if (!data.From.IsEmpty() && !data.To.IsEmpty()) { diff --git a/spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Public/SpineSkeletonAnimationComponent.h b/spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Public/SpineSkeletonAnimationComponent.h index f4a7da2c8..c02d121bd 100644 --- a/spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Public/SpineSkeletonAnimationComponent.h +++ b/spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Public/SpineSkeletonAnimationComponent.h @@ -81,7 +81,7 @@ public: UTrackEntry () { } - void SetTrackEntry (spine::TrackEntry* entry); + void SetTrackEntry (spine::TrackEntry* trackEntry); spine::TrackEntry* GetTrackEntry() { return entry; } UFUNCTION(BlueprintCallable, Category="Components|Spine|TrackEntry") diff --git a/spine-ue4/SpineUE4.uproject b/spine-ue4/SpineUE4.uproject index df2d5b601..85dca7bbd 100644 --- a/spine-ue4/SpineUE4.uproject +++ b/spine-ue4/SpineUE4.uproject @@ -1,6 +1,6 @@ { "FileVersion": 3, - "EngineAssociation": "4.20", + "EngineAssociation": "4.21", "Category": "", "Description": "", "Modules": [