|
@@ -6,29 +6,27 @@ A Spine skeleton is a GameObject and can be used throughout Unity like any other
|
|
|
|
|
|
## Setup
|
|
|
|
|
|
-To run the examples:
|
|
|
-
|
|
|
-1. Download the Spine Runtimes source using [git](https://help.github.com/articles/set-up-git) or by downloading it [as a zip](https://github.com/EsotericSoftware/spine-runtimes/archive/master.zip).
|
|
|
-1. Copy the contents of `spine-csharp/src` to `spine-unity/Assets/spine-csharp`.
|
|
|
-1. Open an example scene file from `spine-unity/Assets/examples/` using Unity 4.3.4+.
|
|
|
-
|
|
|
To use spine-unity in your own Unity project:
|
|
|
|
|
|
1. Copy the contents of `spine-csharp/src` to `Assets/spine-csharp` in your project.
|
|
|
1. Copy the `spine-unity/Assets/spine-unity` to `Assets/spine-unity` in your project.
|
|
|
|
|
|
-### Setup video
|
|
|
-
|
|
|
-The [setup video](https://www.youtube.com/watch?v=-V84OIvZdQc) shows how to manually set up a skeleton, which may be useful for understanding how the pieces fit together. To set up a skeleton automatically:
|
|
|
+The [setup video](https://www.youtube.com/watch?v=-V84OIvZdQc) shows how to manually set up the assets for a skeleton in Unity, which may be useful for understanding how the pieces fit together. Setting up a skeleton automatically is much easier:
|
|
|
|
|
|
1. Move the JSON, atlas and PNG files into your Unity project directory.
|
|
|
-1. Right click the JSON file and click Spine, Ingest. This will create the Unity assets.
|
|
|
+1. Right click the JSON file and click Spine, Ingest to create the Unity assets.
|
|
|
1. Right click the SkeletonData asset that was created and click Spine, Spawn.
|
|
|
|
|
|
The [readme PDF](https://raw.githubusercontent.com/EsotericSoftware/spine-runtimes/master/spine-unity/README.pdf) illustrates these steps.
|
|
|
|
|
|
## Examples
|
|
|
|
|
|
+To run the examples:
|
|
|
+
|
|
|
+1. Download the Spine Runtimes source using [git](https://help.github.com/articles/set-up-git) or by downloading it [as a zip](https://github.com/EsotericSoftware/spine-runtimes/archive/master.zip).
|
|
|
+1. Copy the contents of `spine-csharp/src` to `spine-unity/Assets/spine-csharp`.
|
|
|
+1. Open an example scene file from `spine-unity/Assets/examples/` using Unity 4.3.4+.
|
|
|
+
|
|
|
* **spineboy** This shows the spineboy skeleton. First an animation is played that shows the draw order changing and events firing, then spineboy jumps and walks. Click spineboy to jump again. Notice the walk and jump animations are mixed and transition smoothly. The white cube on spineboy's right hand is a separate GameObject that is positioned using a `BoneComponent`. This example uses images that are split across two atlas pages. This demonstrates a multi-page atlas, but of course has a high number of draw calls.
|
|
|
* **goblins*** This shows a male and female goblin that use the same skeleton and animations. Click to change the skin from male to female and back. It has a single atlas page, so is drawn with just 1 draw call. It uses the `Skeleton Lit` shader for vertex lighting. The [Goblins.cs](https://github.com/EsotericSoftware/spine-runtimes/blob/master/spine-unity/Assets/examples/goblins/Goblins.cs) script manipulates the head bone after the animation is applied.
|
|
|
* **dragon*** This shows the dragon skeleton. The flying animation has many image changes. It also shows shadow rendering. This example uses a multi-page atlas so has a high number of draw calls.
|