Spine tools used to be compared with Cocos 2d, many people think Unity has toolkit 2d and Ngui do not need spine, in fact, this understanding is wrong, spine is very suitable for unity, do not need toolkit, You can adapt to unity on your own.
And because his resources are very small, in terms of efficiency and installation package is better than toolkit 2D, now spine tools have begun to use in unity.
Spine plainly it is a tool for debugging 2D skeletal animations, and how does the tool it debugs use in unity? Let's start the discussion around this issue.
First of all, we need to know, spine debugging good resources including those parts? Let's take a look at the following figure:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/58/31/wKioL1Sr57rBgjn3AABpg-b1nzI469.jpg "title=" 4.jpg " alt= "Wkiol1sr57rbgjn3aabpg-b1nzi469.jpg"/>
It mainly consists of three parts, part is the picture, and the other is the Atlas file which is used to save the location of the pictures, offset, size and other information, may say that people do not understand, I will open the picture degula.png:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/58/34/wKiom1Sr593D4NcZAACJa4UCckA376.jpg "title=" 5.jpg " alt= "Wkiom1sr593d4nczaacja4uccka376.jpg"/>
You see, it's all part of the character, and that Degula.atlas is storing their information:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/58/34/wKiom1Sr6B-BkmqyAAFoAQMMQ7E166.jpg "title=" 7.jpg " alt= "Wkiom1sr6b-bkmqyaafoaqmmq7e166.jpg"/>
We know what the atlas is all about. Let's take a look at the contents of the Degula.json file, which is about preserving the skeleton information of its motion. As follows:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/58/31/wKioL1Sr6YaQlLovAAdsRXD85Qk097.jpg "title=" 8.jpg " alt= "Wkiol1sr6yaqllovaadsrxd85qk097.jpg"/> Above is the contents of the JSON file.
You should note that the name is the same as the extension, which must be followed.
And then we'll put it in unity.
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/58/31/wKioL1Sr6hWA_o9zAABKgG9E26w836.jpg "title=" 9.jpg " alt= "Wkiol1sr6hwa_o9zaabkgg9e26w836.jpg"/>
We're going to right-click to create the material, and the skeleton file is easy for unity to use. Here's how it works:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/58/31/wKioL1Sr6o-yifoDAAXxITNVeE4309.jpg "title=" 10.jpg There are three more files in the "alt=" wkiol1sr6o-yifodaaxxitnvee4309.jpg "/> Directory:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/58/31/wKioL1Sr6vPA9ciHAAB4tSNThIo648.jpg "title=" 11.jpg "alt=" Wkiol1sr6vpa9cihaab4tsnthio648.jpg "/>
Next we'll build it out:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/58/35/wKiom1Sr6pPT6AnSAAVJTmu_Vh4822.jpg "title=" 12.jpg "alt=" Wkiom1sr6ppt6ansaavjtmu_vh4822.jpg "/> Next we click on Spawn to generate the object:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/58/35/wKiom1Sr643QQD0GAAXySuOcSK8994.jpg "title=" 13.jpg "alt=" wkiom1sr643qqd0gaaxysuocsk8994.jpg "/> Effect as shown, next we can set its different actions:
Demo Effect:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/58/35/wKiom1Sr6-Gyum_WAACBeuwRNkM917.jpg "title=" 14.jpg "alt=" Wkiom1sr6-gyum_waacbeuwrnkm917.jpg "/>
Clothes can be fluttering, the effect is good.
We need to first join the Spine_unity script Library when using the load spine skeleton animation, as shown in:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/58/31/wKioL1Sr7SGxYuDlAAESKV61Kf4292.jpg "title=" 15.jpg "alt=" Wkiol1sr7sgxyudlaaeskv61kf4292.jpg "/>
This script library is for the spine tool load unity provided, you can search on the Internet, there is not much to say, that its in the game is what? We used it to do a simple demo to everyone to see:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/58/35/wKiom1Sr7N_DuvUrAAO8BuyABhA179.jpg "style=" float: none; "title=" 2.jpg "alt=" Wkiom1sr7n_duvuraao8buyabha179.jpg "/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/58/31/wKioL1Sr7Z-jBajfAAP0-PyblDY981.jpg "style=" float: none; "title=" 3.jpg "alt=" Wkiol1sr7z-jbajfaap0-pybldy981.jpg "/>
The effect is also good, like the game of DotA, spine in unity of the use of here, if there is not clear welcome message.
This article is from the "Kaiyukan mobile" blog, so be sure to keep this source http://jxwgame.blog.51cto.com/943299/1599972
The use of spine tools in unity