Antidamage

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.
Antidamage
  • Сообщения: 38

Mario

Sorry for that! I'd be happy to merge a pull request and ensure spine-cpp keeps working as is.
Аватара пользователя
Mario

Mario
  • Сообщения: 2504

dereksun

did this get merged in yet? i am running into this issue in 4.25
dereksun
  • Сообщения: 3

Mario

We did work on warnings. Could you post what you see in 4.25 and the MSVC version you are using?
Аватара пользователя
Mario

Mario
  • Сообщения: 2504

dereksun

VS2019

I started over and redid the integration. Works fine. 8)
dereksun
  • Сообщения: 3

skeptis

dereksun писал(а):VS2019

I started over and redid the integration. Works fine. 8)
Hi, please tell me how you fixed it
skeptis
  • Сообщения: 8

Harald

spine-ue4 Runtime Documentation: Updating spine ue4 Runtime

One of the most common errors is to only update the spine-ue4 part, and forgetting to copy the latest version of the spine-cpp runtimes over as well.
Аватара пользователя
Harald

Harri
  • Сообщения: 2769

skeptis

Harald писал(а):http://esotericsoftware.com/spine-ue4#Updating-spine-ue4-Runtime

One of the most common errors is to only update the spine-ue4 part, and forgetting to copy the latest version of the spine-cpp runtimes over as well.
I`ve made all steps from this instruction:
1. Create a new Unreal Engine code project. You don't need to write C++, but the code project is needed for the plugin to compile. See the Unreal Engine documentation or have a look at the example in this repository.
2. Download the Spine Runtimes source using git (git clone https://github.com/esotericsoftware/spine-runtimes) or download it as a zip via the download button above.
3. Copy the Plugins folder from this directory to your new project's root directory.
4. Copy the folder spine-runtimes/spine-cpp/spine-cpp to your project's Plugins/SpinePlugin/Source/SpinePlugin/Public/ folder.
Open the Unreal Project in the Unreal Editor

And i have this warnings:
warnings2.jpg
У вас нет необходимых прав для просмотра вложений в этом сообщении.
skeptis
  • Сообщения: 8

Harald

These warnings have just been fixed, both on the 3.8 and 4.0-beta branches of the spine-cpp runtime. You can pull the latest changes and integrate it into your UE4 project as usual. Thanks for reporting.

Issue ticket (pull request) for later reference:
https://github.com/EsotericSoftware/spine-runtimes/pull/1808
Аватара пользователя
Harald

Harri
  • Сообщения: 2769


Вернуться в Runtimes