• Editor
  • Unity and C# runtimes, more videos

Related Discussions
...
  • Modificato
  1. Thank you so much for this! I'm particularly happy about the fact that it has no dependencies on other plug-ins. I have essentially zero dollars right now and I've just barely scrapped together the money to support Spine on Kickstarter (after supporting Spriter however long ago when they ran theirs) and I was not looking forward to having to either learn Futile or purchase 2D Toolkit. Making it standalone is a pleasant surprise and I appreciate that.

  2. Umm...how do I download it? I'm very new to GitHub (signed up today) and I don't understand what I need to do. Could someone perhaps point me in the right direction?

Hi rxninja,

To download the source you can either click the "ZIP" button, so it will download the entire source packed as a ZIP, or you can download and sync to the spine repo in github, you can just download the github PC client, set it and drag the Spine repository URL, it will begin to sync the repo. I prefer this way because it will be easier to stay up-to-date for changes/fixes.

Yep, as Cuellarjmcg. Zip is easiest, otherwise I recommend SmartGit, which is free for personal use.

Thanks a lot for getting the Unity runtime out. It's working great!

Cuellarjmcg ha scritto

Hi rxninja,

To download the source you can either click the "ZIP" button, so it will download the entire source packed as a ZIP, or you can download and sync to the spine repo in github, you can just download the github PC client, set it and drag the Spine repository URL, it will begin to sync the repo. I prefer this way because it will be easier to stay up-to-date for changes/fixes.

I understood some of those words. I think I can figure it out from there haha.

EDIT: Nope, I lied. I don't see a "ZIP" button anywhere on the page. I also tried downloading multiple Git clients and none of them make a lick of sense to me. Hoo boy.

I successfully imported the Unity runtime, and tested the performance.

With 30 spineboys in screen ,the performance is perfect! :yes:

And here is a tiny question :

In Unity example, the images are combined into atlas (1 big image and 1 "*.atlas" description file), while in editor's folder they are separated images.

How to created the atlas file ? Is there some tool to combine the images into atlas?

Oops, forgot to mention, it's the libgdx format.

I'm not crazy. There's no ZIP button for me. I thought it was just my GitHub ineptitude, but there is legitimately no button.

Immagine rimossa a causa della mancanza di supporto per HTTPS. | Mostra Comunque

I got it from Nate's last link, but bugging the dev every time there's an update seems to be a fairly inefficient use of everyone's time.

Thoughts?

On a semi-related note, I really don't understand how to use this runtime. If anyone more experienced and competent were to make a tutorial video on how to get everything up and running and how to use some of the features like dynamic image swapping (e.g. to swap out a character's outfit), that would be super helpful. I know I would appreciate it and I bet it would also help others who are fairly new to Unity and the code-centric side of things (I'm coming from a moderate Photoshop/Illustrator background with light experience in QBASIC and VBas).

The link I posted is github's link, it will always download the latest. Click "CODE" in github to see the zip button.

Did you see the Unity example project? You can play an animation that changes an image. You can use the C# API, eg:

gameobject.GetComponent<SkeletonComponent>().skeleton.SetAttachment("slot name", "attachment name");

It may be some time until there are proper docs.

This is awesome! The runtime is super efficient. Just a couple of little things I noticed when checking out the runtime.

1) Data asset creation - It looks like it always creates in the "Assets/" folder. It'd be nice if it created in your currently selected folder. Super small thing but I can see it preventing some whining haha.

[MenuItem("Assets/Create/Spine/Spine Atlas")]
static public void CreateAtlas() 
{
	string path = EditorUtility.GetAssetPath(Selection.activeObject) + "/SpineAtlasData";
	CreateAsset<AtlasAsset>(path);
}

2) Bones as GameObjects - Im not sure how inefficient it is to have bones as individual game objects. I think it would boost the flexibility of using spine in Unity. It would allow designers to add box colliders, scripts, and components to specific bones. AFAIK large numbers of objects is pretty minimal performance-wise. It's the scripts that run on them and the draw calls that impact performance the most.

Thanks for taking a look. 🙂

I'll add the GetAssetPath, thanks!

You may be right about the game objects. I've read about Unity's dynamic batching, which does batching across game objects (though it is limited to only 300 vertices, interestingly). However, I have a feeling most usage will not need a game object per bone. When we have bounding boxes, it would make sense to create colliders for those. I'm open to potentially adding game-object-per-bone rendering in the future, but right now I still need to integrate better with 2D Toolkit and all the other tasks.

Great job, guys! It's working pretty efficiently.

Anyway, I dunno if this a known bug or something you haven't implemented yet for everything.

I tried making a few basic looping animations (a bunch of rectangles rotating 90º back and forth with different interpolation curves) and it seems like the curve data in the JSON aren't being followed by the Unity/C# runtime. Everything is animating linearly regardless of the curve data except for the Stepped variety which functions correctly.

There was a bug with curves in spine-csharp. Fixed now, thanks! 🙂

Sweet! 🙂 Unity certainly makes it easy to demo. Shiu, maybe we should put together some animations for a Spine webpage? 🙂