How to change spine character's weapon and clothes efficiently in Godot?

Related Discussions
...

I think you can use skins.

5 gün sonra

Mario
By the way,is there any similar API to GetRepackedSkin(spine-unity runtime API) in Godot C#?

There is currently not for technical reasons.

    Mario Thanks.Maybe I should change a way to change attachment.T_T godot C# blood lacks tutorials.And I find a code set of spine-unity just now.Code sbelow.Can it be transferred to godot C#?

    Mario And is there a link about spine-ue4 API guide?

      kodoly The API reference common to all runtimes can be found here:
      http://esotericsoftware.com/spine-api-reference
      As you can see in the API reference, the GetRemappedClone() method is not a common method in all runtimes, but is unique to spine-unity. So, unfortunately, it is not available in other runtimes as it is.

        Misaki Is there a method to replace the attachment of a spine object in godot C#?

        Misaki I have tried such way:Evertime I press Key A,adding a new skin,copying current skin to the new skin,then removing the attachments in this skin and add new attachments.The result is that every 16+ times I press A,godot C# crash.Codes below,I wonder how to rewrite it.

          T.Fly() What about Unreal Engine?Is attachment API currently exposed to UE4?

            Misaki The UE API SetAttachment() require all attachments add to the slot and select attachment in attachments through attachment Name,which means all equipment textures combine in one file.Will redundant files make the program Cottonwood and affect computer performance?

              kodoly Since your question was about the attachment API, I only answered about how to set attachments, but it seems to me that for what you want to do, you should still use skins as SilverStraw and Mario answered at the beginning.
              Unfortunately, spine-ue4 does not provide a method to repack texture atlas pages at runtime, but it is possible to set multiple skins at once using SetSkins which is provided by the skeleton component:
              https://github.com/EsotericSoftware/spine-runtimes/blob/64853b73bcbce53a1851b2b3b05ba8f5ab37e6d8/spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Private/SpineSkeletonComponent.cpp#L46C7-L46C7
              To set multiple skins on your skeleton, create a string type array with the names of the skins you want to combine and then pass it to SetSkins.
              The latest example project contains 09-skins, which is a level that demonstrates how to set multiple skins on a skeleton.

              By the way, if you want to continue asking questions about spine-ue4, you should start a new thread, since this thread was originally for a question about spine-godot.