Merge branch '4.0' into 4.1-beta

This commit is contained in:
Harald Csaszar 2022-03-24 12:00:59 +01:00
commit 7ae25bf19c
6 changed files with 14 additions and 4 deletions

View File

@ -302,6 +302,7 @@
* Timeline track appearance and Inspector: Tracks now show icons and track colors to make them easier to distinguish. When a Track is selected, the Inspector now shows an editable track name which was previously only editable at the Timeline asset.
* Added example component `SkeletonRenderTexture` to render a `SkeletonRenderer` to a `RenderTexture`, mainly for proper transparency. Added an example scene named `RenderTexture FadeOut Transparency` that demonstrates usage for a fadeout transparency effect.
* Added another fadeout example component named `SkeletonRenderTextureFadeout` which takes over transparency fadeout when enabled. You can use this component as-is, attach it in disabled state and enable it to start a fadeout effect.
* Timeline clips now offer an additional `Alpha` parameter for setting a custom constant mix alpha value other than 1.0, just as `TrackEntry.Alpha`. Defaults to 1.0.
* **Changes of default values**

View File

@ -36,7 +36,7 @@ using UnityEngine;
public class SpineAnimationStateDrawer : PropertyDrawer {
public override float GetPropertyHeight (SerializedProperty property, GUIContent label) {
const int fieldCount = 15;
const int fieldCount = 16;
return fieldCount * EditorGUIUtility.singleLineHeight;
}
@ -48,6 +48,7 @@ public class SpineAnimationStateDrawer : PropertyDrawer {
SerializedProperty useBlendDurationProp = property.FindPropertyRelative("useBlendDuration");
SerializedProperty mixDurationProp = property.FindPropertyRelative("mixDuration");
SerializedProperty holdPreviousProp = property.FindPropertyRelative("holdPrevious");
SerializedProperty alphaProp = property.FindPropertyRelative("alpha");
SerializedProperty dontPauseWithDirectorProp = property.FindPropertyRelative("dontPauseWithDirector");
SerializedProperty dontEndWithClip = property.FindPropertyRelative("dontEndWithClip");
SerializedProperty endMixOutDuration = property.FindPropertyRelative("endMixOutDuration");
@ -129,5 +130,8 @@ public class SpineAnimationStateDrawer : PropertyDrawer {
singleFieldRect.y += lineHeightWithSpacing;
EditorGUI.PropertyField(singleFieldRect, drawOrderProp);
singleFieldRect.y += lineHeightWithSpacing;
EditorGUI.PropertyField(singleFieldRect, alphaProp);
}
}

View File

@ -69,6 +69,9 @@ namespace Spine.Unity.Playables {
[Range(0, 1f)]
public float drawOrderThreshold = 0.5f;
[Range(0, 1f)]
public float alpha = 1.0f;
}
}

View File

@ -193,6 +193,7 @@ namespace Spine.Unity.Playables {
trackEntry.TimeScale = clipSpeed * rootSpeed;
trackEntry.AttachmentThreshold = clipData.attachmentThreshold;
trackEntry.HoldPrevious = clipData.holdPrevious;
trackEntry.Alpha = clipData.alpha;
if (clipData.customDuration)
trackEntry.MixDuration = customMixDuration / rootSpeed;
@ -289,6 +290,7 @@ namespace Spine.Unity.Playables {
if (toAnimation != null) {
toEntry = dummyAnimationState.SetAnimation(0, toAnimation, clipData.loop);
toEntry.HoldPrevious = clipData.holdPrevious;
toEntry.Alpha = clipData.alpha;
}
}
@ -304,7 +306,7 @@ namespace Spine.Unity.Playables {
dummyAnimationState.Apply(skeleton);
} else {
if (toAnimation != null)
toAnimation.Apply(skeleton, 0, toClipTime, clipData.loop, null, 1f, MixBlend.Setup, MixDirection.In);
toAnimation.Apply(skeleton, 0, toClipTime, clipData.loop, null, clipData.alpha, MixBlend.Setup, MixDirection.In);
}
if (skeletonAnimation) {

View File

@ -2,7 +2,7 @@
"name": "com.esotericsoftware.spine.timeline",
"displayName": "Spine Timeline Extensions",
"description": "This plugin provides integration of spine-unity for the Unity Timeline.\n\nPrerequisites:\nIt requires a working installation of the spine-unity runtime (via the spine-unity unitypackage), version 4.1.\n(See http://esotericsoftware.com/git/spine-runtimes/spine-unity)",
"version": "4.1.4",
"version": "4.1.5",
"unity": "2018.3",
"author": {
"name": "Esoteric Software",

View File

@ -2,7 +2,7 @@
"name": "com.esotericsoftware.spine.timeline",
"displayName": "Spine Timeline Extensions",
"description": "This plugin provides integration of spine-unity for the Unity Timeline.\n\nPrerequisites:\nIt requires a working installation of the spine-unity and spine-csharp runtimes as UPM packages (not as spine-unity unitypackage), version 4.1.\n(See http://esotericsoftware.com/git/spine-runtimes/spine-unity)",
"version": "4.1.4",
"version": "4.1.5",
"unity": "2018.3",
"author": {
"name": "Esoteric Software",