Good night.

I created a project in Spine with several categories of skins to collect different outfits for the character.

The blueprint unreal engine has a Set Skins node, an array of skins is passed to it.

When I select the first category, call the Set Skins node and pass the name of one skin, everything is displayed.

Then I select the second category and already pass an array with two skins, but the second category is not displayed.

But if you transfer two skins at once, it is displayed.

It seems to me that the problem is that when calling Set Skins, an array of the same size is passed and on subsequent calls, but with a different array size, something breaks.

I made a test project where I include one category, and then I include two categories and the second category is not displayed. But if you turn on two categories at once and change the skin, then everything works.

I recorded a video and made screenshots.

Maybe I'm doing something wrong.

Thank you, I would really like to solve this as soon as possible.




Related Discussions
...

It seems like you are encountering an issue with the Set Skins node in Unreal Engine when passing arrays of different sizes. This might be related to how the Set Skins function handles the array of skins internally. Here are a few steps you can try to troubleshoot and potentially resolve the issue:

  1. Ensure Proper Skin Setup: Make sure that each skin is properly set up in Spine and that there are no conflicts or missing attachments. Refer to the Spine API reference for setSkin and setSlotsToSetupPose to ensure that the skins are being applied correctly.

  2. Translucency Sort Policy: If you are using an Orthographic camera, try setting the Translucency Sort Policy to Sort Along Axis in the Project Settings under Engine > Rendering > Translucency. This has been known to solve sorting problems in some cases.

  3. Consistent Array Size: As a workaround, you might try always passing an array of the same size to the Set Skins node. For example, if you are adding a new skin, include all previously added skins in the array.

  4. Debugging: Check for any warnings or errors in the Unreal Engine log that might give more insight into what is going wrong when the array size changes.

  5. Minimal Project: If the issue persists, consider creating a minimal Unreal Engine project that reproduces the problem and send it to the support team for further investigation. This will help them understand the issue better and provide a more accurate solution.

Here is a link to a related forum discussion that might provide additional insights: Orthographic camera not displaying sprites in correct order.

If none of these steps resolve the issue, it might be necessary to look deeper into the implementation of the Set Skins function in the Spine-UE4 runtime.

After calling the Set Skins node, I added the Set Slots to Setup Pose call.

Everything works fine.

Thank you and sorry for the trouble.

You are the best!