diff --git a/CHANGELOG.md b/CHANGELOG.md index 22f5f773c..dfc1051a1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -231,6 +231,7 @@ a) the `Packages` directory in your project where it will automatically be loaded, or b) to an arbitrary directory outside the Assets directory and then open Package Manager in Unity, select the `+` icon, choose `Add package from disk..` and point it to the package.json file. The Project panel should now show an entry `Spine Timeline Extensions` under `Packages`. If the directory is not yet listed, you will need to close and re-open Unity to have it display the directory and its contents. + * `SkeletonMecanim`'s `Layer Mix Mode` enum name `MixMode.SpineStyle` has been renamed to `MixMode.Hard`. This is most likely not set via code and thus unlikely to be a problem. Serialized scenes and prefabs are unaffected. * **Additions** * **Spine Preferences stored in Assets/Editor/SpineSettings.asset** Now Spine uses the new `SettingsProvider` API, storing settings in a SpineSettings.asset file which can be shared with team members. Your old preferences are automatically migrated to the new system. @@ -263,7 +264,7 @@ You can leave this parameter disabled when everything is drawn correctly to save the additional performance cost. * **Changes of default values** - * `SkeletonMecanim`'s `Layer Mix Mode` now defaults to `MixMode.SpineStyle` instead of `MixMode.MixAlways`. + * `SkeletonMecanim`'s `Layer Mix Mode` now defaults to `MixMode.MixNext` instead of `MixMode.MixAlways`. * `BlendModeMaterialAsset` and it's instance `Default BlendModeMaterials.asset` now have `Apply Additive Material` set to `true` by default in order to apply all blend modes by default. * **Deprecated** diff --git a/spine-unity/Assets/Spine/Runtime/spine-unity/Components/SkeletonMecanim.cs b/spine-unity/Assets/Spine/Runtime/spine-unity/Components/SkeletonMecanim.cs index 8de48117c..be4c93a48 100644 --- a/spine-unity/Assets/Spine/Runtime/spine-unity/Components/SkeletonMecanim.cs +++ b/spine-unity/Assets/Spine/Runtime/spine-unity/Components/SkeletonMecanim.cs @@ -116,7 +116,7 @@ namespace Spine.Unity { public MixBlend[] layerBlendModes = new MixBlend[0]; #endregion - public enum MixMode { AlwaysMix, MixNext, SpineStyle } + public enum MixMode { AlwaysMix, MixNext, Hard } readonly Dictionary animationTable = new Dictionary(IntEqualityComparer.Instance); readonly Dictionary clipNameHashCodeTable = new Dictionary(AnimationClipEqualityComparer.Instance); @@ -161,7 +161,7 @@ namespace Spine.Unity { public void Apply (Skeleton skeleton) { if (layerMixModes.Length < animator.layerCount) { System.Array.Resize(ref layerMixModes, animator.layerCount); - layerMixModes[animator.layerCount-1] = MixMode.SpineStyle; + layerMixModes[animator.layerCount-1] = MixMode.MixNext; } #if UNITY_EDITOR @@ -266,7 +266,7 @@ namespace Spine.Unity { interruptingStateInfo.loop, null, weight, layerBlendMode, MixDirection.In); } } - } else { // case MixNext || SpineStyle + } else { // case MixNext || Hard // Apply first non-zero weighted clip int c = 0; for (; c < clipInfoCount; c++) { @@ -283,7 +283,7 @@ namespace Spine.Unity { c = 0; if (hasNext) { // Apply next clip directly instead of mixing (ie: no crossfade, ignores mecanim transition weights) - if (mode == MixMode.SpineStyle) { + if (mode == MixMode.Hard) { for (; c < nextClipInfoCount; c++) { var info = nextClipInfo[c]; float weight = info.weight * layerWeight; if (weight == 0) continue; GetAnimation(info.clip).Apply(skeleton, 0, AnimationTime(nextStateInfo.normalizedTime, info.clip.length, nextStateInfo.speed < 0), nextStateInfo.loop, null, 1f, layerBlendMode, MixDirection.In); @@ -300,7 +300,7 @@ namespace Spine.Unity { c = 0; if (isInterruptionActive) { // Apply next clip directly instead of mixing (ie: no crossfade, ignores mecanim transition weights) - if (mode == MixMode.SpineStyle) { + if (mode == MixMode.Hard) { for (; c < interruptingClipInfoCount; c++) { var info = interruptingClipInfo[c]; float clipWeight = shallInterpolateWeightTo1 ? (info.weight + 1.0f) * 0.5f : info.weight;