This commit is contained in:
badlogic 2019-11-26 18:12:19 +01:00
commit bdad0c7170
30 changed files with 15 additions and 5533 deletions

View File

@ -197,6 +197,7 @@
* `Real physics hinge chains` for both 2D and 3D physics. The [SkeletonUtilityBone](http://esotericsoftware.com/spine-unity#SkeletonUtilityBone) Inspector provides an interface to create 2D and 3D hinge chains. Previously created chains have only been respecting gravity, but not momentum of the skeleton or parent bones. The new physics rig created when pressing `Create 3D Hinge Chain` and `Create 2D Hinge Chain` creates a more complex setup that also works when flipping the skeleton. Note that the chain root node is no longer parented to bones of the skeleton. This is a requirement in Unity to have momentum applied properly - do not reparent the chain root to bones of your skeleton, or you will loose any momentum applied by the skeleton's movement.
* `Outline rendering functionality for all shaders.` Every shader now provides an additional set of `Outline` parameters to enable custom outline rendering. When outline rendering is enabled via the `Material` inspector, it automatically switches the shader to the respective `Spine/Outline` shader variant. Outlines are generated by sampling neighbour pixels, so be sure to add enough transparent padding when exporting your atlas textures to fit the desired outline width. In order to enable outline rendering at a skeleton, it is recommended to first prepare an additional outline material copy and then switch the material of the target skeleton to this material. This prevents unnecessary additional runtime material copies and drawcalls. Material switching can be prepared via a [SkeletonRendererCustomMaterials](http://esotericsoftware.com/spine-unity#SkeletonRendererCustomMaterials) component and then enabled or disabled at runtime. Alternatively, you can also directly modify the `SkeletonRenderer.CustomMaterialOverride` property.
Outline rendering is fully supported on `SkeletonGraphic` shaders as well.
* Added `SkeletonRenderer.EditorSkipSkinSync` scripting API property to be able to set custom skins in editor scripts. Enable this property when overwriting the Skeleton's skin from an editor script. Without setting this parameter, changes will be overwritten by the next inspector update. Only affects Inspector synchronisation of skin with `initialSkinName`, not startup initialization.
* **Changes of default values**
* `SkeletonMecanim`'s `Layer Mix Mode` now defaults to `MixMode.MixNext` instead of `MixMode.MixAlways`.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

View File

@ -1,146 +0,0 @@
hero-pro.png
size: 1024,256
format: RGBA8888
filter: Linear,Linear
repeat: none
body
rotate: false
xy: 324, 81
size: 97, 95
orig: 97, 95
offset: 0, 0
index: -1
cape
rotate: false
xy: 176, 88
size: 146, 159
orig: 146, 159
offset: 0, 0
index: -1
eyes
rotate: false
xy: 604, 216
size: 82, 31
orig: 82, 31
offset: 0, 0
index: -1
fingers
rotate: false
xy: 877, 214
size: 31, 33
orig: 31, 33
offset: 0, 0
index: -1
foot1
rotate: false
xy: 743, 205
size: 50, 42
orig: 50, 42
offset: 0, 0
index: -1
foot2
rotate: false
xy: 688, 209
size: 53, 38
orig: 53, 38
offset: 0, 0
index: -1
forearm1
rotate: false
xy: 795, 198
size: 41, 49
orig: 41, 49
offset: 0, 0
index: -1
forearm2
rotate: false
xy: 910, 215
size: 31, 32
orig: 31, 32
offset: 0, 0
index: -1
hand1
rotate: false
xy: 838, 199
size: 37, 48
orig: 37, 48
offset: 0, 0
index: -1
hand2
rotate: false
xy: 286, 49
size: 31, 37
orig: 31, 37
offset: 0, 0
index: -1
head
rotate: false
xy: 2, 74
size: 172, 173
orig: 172, 173
offset: 0, 0
index: -1
mantles
rotate: false
xy: 2, 17
size: 136, 55
orig: 136, 55
offset: 0, 0
index: -1
mouth
rotate: false
xy: 2, 2
size: 61, 13
orig: 61, 13
offset: 0, 0
index: -1
shin1
rotate: false
xy: 482, 119
size: 53, 57
orig: 53, 57
offset: 0, 0
index: -1
shin2
rotate: false
xy: 192, 32
size: 51, 54
orig: 51, 54
offset: 0, 0
index: -1
sword
rotate: false
xy: 324, 178
size: 216, 69
orig: 216, 69
offset: 0, 0
index: -1
thigh1
rotate: false
xy: 542, 184
size: 60, 63
orig: 60, 63
offset: 0, 0
index: -1
thigh2
rotate: false
xy: 423, 112
size: 57, 64
orig: 57, 64
offset: 0, 0
index: -1
upper-arm1
rotate: false
xy: 140, 16
size: 50, 56
orig: 50, 56
offset: 0, 0
index: -1
upper-arm2
rotate: false
xy: 245, 27
size: 39, 59
orig: 39, 59
offset: 0, 0
index: -1

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 126 KiB

View File

@ -1,5 +0,0 @@
Copyright (c) 2014, XDTech
The project file and images in this "Hero" project are provided for
demonstration purposes only and may not be redistributed for any reason nor
used as the basis for derivative work.

View File

@ -509,7 +509,7 @@ namespace Spine.Unity.Editor {
}
static bool UpdateIfSkinMismatch (SkeletonRenderer skeletonRenderer, string componentSkinName) {
if (!skeletonRenderer.valid) return false;
if (!skeletonRenderer.valid || skeletonRenderer.EditorSkipSkinSync) return false;
var skin = skeletonRenderer.Skeleton.Skin;
string skeletonSkinName = skin != null ? skin.Name : null;

View File

@ -61,6 +61,15 @@ namespace Spine.Unity {
/// <summary>Skin name to use when the Skeleton is initialized.</summary>
[SerializeField] [SpineSkin(defaultAsEmptyString:true)] public string initialSkinName;
/// <summary>Enable this parameter when overwriting the Skeleton's skin from an editor script.
/// Otherwise any changes will be overwritten by the next inspector update.</summary>
#if UNITY_EDITOR
public bool EditorSkipSkinSync {
get { return editorSkipSkinSync; }
set { editorSkipSkinSync = value; }
}
protected bool editorSkipSkinSync = false;
#endif
/// <summary>Flip X and Y to use when the Skeleton is initialized.</summary>
[SerializeField] public bool initialFlipX, initialFlipY;
#endregion

View File

@ -162,6 +162,9 @@ namespace Spine {
freeItems.Enqueue(item);
}
FlushVertexArray(device, vertexCount, triangleCount);
}
public void AfterLastDrawPass () {
items.Clear();
}

View File

@ -86,6 +86,7 @@ namespace Spine {
pass.Apply();
batcher.Draw(device);
}
batcher.AfterLastDrawPass();
}
public void Draw(Skeleton skeleton) {