Thank you! I will give that a shot. I mistakenly thought Skins were a build and import time only feature because the Unity Spine runtime editor has a lot of post processing on the assets.
vishaalk

- 1 janv. 2024
- Inscrit 1 sept. 2023
We want to switch our Skeleton's weapon at runtime but couldn't figure out the right way to do it.
The problem is this weapon image is generated on the fly via an image generator so (if I understand correctly) it can't be put as an attachment in the slot where the weapon would otherwise be in the Spine project. I saw in the Spine tutorials with the goblin they change from a staff to a dagger by switching the attachment ( Perhaps I can still do this with the image even if the image/attachment is not included in the original Spine file? I saw this tutorial from a while ago:
In addition, each user in our game has a unique random generated weapon image for that specific character (it's a turn based strategy game so they are like Fire Emblem units). We would store the generated
.atlas.txt
,.json
, and.png
and at runtime I was able to assemble this into a SkeletonDataAsset + SkeletonDataAtlasAsset and have it work correctly, but the final step is making the Spine export process after generating the image of the weapon, which I am working on now.We have a need to export some Spine Assets on demand. I know the server needs to have OpenGL, but wondering if there is anything in the license or in the feature that might block us from putting Spine on an EC2 box we own (persistent), and using that as a server to generate some assets and store them in S3.
I found this as well: https://github.com/EsotericSoftware/spine-runtimes/blob/aa0b9d57ca0672b3f1e59509c93e50432cd3c0e6/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Utility/AssetUtility.cs#L340
Seems to be what I am looking for
I am looking for the code that runs when you import the exported Spine assets into Unity. For example, a Material gets created with "Additive" in the name, and it sets some properties.
Am I correct in that all of that stuff is here? https://github.com/EsotericSoftware/spine-runtimes/tree/aa0b9d57ca0672b3f1e59509c93e50432cd3c0e6/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Utility
For example,
OnPreprocessTexture
for Textures. I am looking for the equivalent function for the Atlas and the JSON Skeleton.