I've recently updated my Spine runtime for UE4 and I keep having this problem after doing a full rebuild. I've had this every time I upgrade the Spine runtime. I've been able to randomly get past it after a few days but I don't always have time for that.
J:/Projects/PoppyAndBuddy 4.24/Plugins/SpinePlugin/Source/SpinePlugin/Private/SpineSkeletonDataAsset.cpp(235): warning C4458: declaration of 'skeletonData' hides class member
J:\Projects\PoppyAndBuddy 4.24\Plugins\SpinePlugin\Source\SpinePlugin\Public\SpineSkeletonDataAsset.h(95): note: see declaration of 'USpineSkeletonDataAsset::skeletonData'
J:\UE_4.24\Engine\Source\Runtime\Core\Public\Algo/IntroSort.h(40): warning C4459: declaration of 'Current' hides global declaration
J:/Projects/PoppyAndBuddy 4.24/Plugins/SpinePlugin/Source/SpinePlugin/Public/spine-cpp/src/spine/AnimationState.cpp(297): note: see declaration of 'Current'
And more like that.
I've tried adding "ShadowVariableWarningLevel = WarningLevel.Warning;" after it sets V1 defaults for 4.24 or later in both build files, but it doesn't help. Also, despite the issues just being warnings, it fails the build because of it.
How do I fix this? Is it something about the default setup of Spine for UE4?
Ok, I think I'm finding my feet and reaching the same point I did last time, and I ended up fixing some of this stuff.
J:/Projects/PoppyAndBuddy 4.24/Plugins/SpinePlugin/Source/SpinePlugin/Private/SpineSkeletonDataAsset.cpp(235): warning C4458: declaration of 'skeletonData' hides class member:
SkeletonData* skeletonData = nullptr;
This is obviously wrong. You can't redeclare member variables.
There's other issues I've come across and raised before that haven't been fixed, would a pull request be of any help?
J:\UE_4.24\Engine\Source\Runtime\Core\Public\Containers/UnrealString.h(1843): warning C4459: declaration of 'First' hides global declaration
J:\UE_4.24\Engine\Source\Runtime\Core\Public\Algo/IntroSort.h(40): warning C4459: declaration of 'Current' hides global declaration
AnimationState.cpp globally declares "First" and "Current":
const int First = 1;
const int Current = 2;
This is in the spine-cpp folder so I'm less confident about changing this, but this constant isn't even defined in a namespace, so it has a very high chance of running into problems. Seems like a bad move. Can you fix this by pushing everything into a Spine namespace?
Edit: wrapped it in a namespace, updated a few locations, now it works well. I will try setting up a pull request.