SPARK-inc / SPCRJointDynamicsUE4

布風骨物理エンジン
MIT License
376 stars 74 forks source link

[=] is deprecated in C++20 in UE5.4 or later #19

Open TojiroIwamoto opened 7 months ago

TojiroIwamoto commented 7 months ago

The C++ version will change to C++20 in UE5.4 or later. Since the implicit capture of this by [=] is deprecated in C++20, some codes need to be modified. The following notation is an example of the modification, and we hope it will be helpful.

image

silence177-bit commented 3 months ago

Thanks, bro,But I only find two places [=],I fix it but can't work,Did I miss any steps?

TojiroIwamoto commented 3 months ago

Yes, there were two errors. (screenshots attached)

Apart from this error, there was a variable in [AnimNode_SPCRJointDynamics.h] that was not initialized, so I fixed it locally. However, this may not be a necessary fix.

AnimNode_SPCRJointDynamics.h

Line 72. class UCurveFloat Curve; -> class UCurveFloat Curve = nullptr;

Line 91. class UCurveFloat Curve; → class UCurveFloat Curve = nullptr

Line 406. USPCRJointDynamicsComponent jointDynamicsComponent; → USPCRJointDynamicsComponent jointDynamicsComponent = nullptr

In the meantime, I compiled the plugin with these responses and the plugin is working with ue5.4.2.

aa

Zacliee commented 1 month ago

Could you please release a recompiled plugin for UE 5.4? I'm a rather stupid person at C++ and can barely read your tutorials, I'm very sorry. I'd appreciate it if you would publish or send me a modified plugin individually

TojiroIwamoto commented 1 month ago

Plugin confirmed to work with UE5.4.3 I have not included PDB data due to file size, but if you are not debugging with C++, there should be no problem since it is not necessary.

SPCRJointDynamics.zip

Zacliee commented 1 month ago

Thank you very much for your contribution, but I'm getting a crash when using the plugin. The error occurred when I opened the animation blueprint, loaded nodes included in the plugin, linked them, and started compiling. For a moment, the compilation was successful, but as I habitually dragged blueprint elements, the software crashed

Here's the main error message:

LoginId: 4fae58a144be6eb4d8637b954dfb4c8c EpicAccountId: 80156282345f4de3ba7502e422695cec

Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0xffffffffffffffff

And below is the beginning of the call stack and lines referencing the plugin:

UnrealEditor_SlateCore UnrealEditor_SlateCore UnrealEditor_SPCRJointDynamicsEd UnrealEditor_UnrealEd UnrealEditor_Persona

Additionally, both my UE5 software installation and project files are located on the E drive rather than the system drive. So far, however, no other functionality has encountered issues. I sincerely appreciate your efforts to update the plugin, and I hope you can further address and fix its issues. Thank you for your contribution.

TojiroIwamoto commented 1 month ago

Thanks for the report. I have created a version that fixes the crash.

SPCRJointDynamics.zip

Zacliee commented 1 month ago

Thank you!!!! It's starting to work!!