• Runtimes
  • How can I use the spine data by unity3d!Help!

I have made the spine animationData file by spine.Includes *.atlas *.json *.png,etc.
But,how can I use the C# script in unity3d make an animation.
I have read the document. But I understand the word "Often a runtime will provide a texture loader that knows how to create and dispose for a specific game toolkit".Where's it ? I can only find a interface in unity3d runtime.
Please help me.
Thanks very much.

Related Discussions
...

Have you looked at the example projects that come with the runtime? Add a SpineAnimation component to your GameObject and give it your SkeletonData asset. The runtime takes care of the "texture loader" stuff and rendering the skeleton.

The documentation you quoted is for how a runtime is built. Still, if you want to see how it works it is here:
https://github.com/EsotericSoftware/spi ... set.cs#L74

Thank you,Nate. But it can't help me. I want to use the c# script make a spineAnimation,like this:
"
TextureLoader textureLoader = ...
Atlas atlas = new Atlas("myAtlas.atlas", textureLoader);
SkeletonJson json = new SkeletonJson(atlas);
SkeletonData skeletonData = json.readSkeletonData("mySkeleton.json");
"
I have no idea where find the "TextureLoader textureLoader";
Do you mean I have to write a class implements the TextureLoader interface ?
I have read the MaterialsTextureLoader ,but it needs an AtlasAsset, I can't create an AtlasAsset instance.

In fact. I want to know how can I load the atlas and the josn files in the run time.

Thank you ,again.

Do you mean I have to write a class implements the TextureLoader interface ?

Yes. TextureLoader is what sets the rendererObject on the AtlasPage, which is used by SkeletonMesh to find the Material. You can write your own and find the materials however you like, you don't have to use an AtlasAsset.

Thank you very much.But I can't understand, why dosen't the team offer the completed TextureLoader. Or can you offer one for me?

I linked you to the MaterialsTextureLoader that the runtime uses.