mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-04 14:24:53 +08:00
Merge branch '4.0' into 4.1-beta
This commit is contained in:
commit
7ae25bf19c
@ -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**
|
||||
|
||||
|
||||
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@ -69,6 +69,9 @@ namespace Spine.Unity.Playables {
|
||||
|
||||
[Range(0, 1f)]
|
||||
public float drawOrderThreshold = 0.5f;
|
||||
|
||||
[Range(0, 1f)]
|
||||
public float alpha = 1.0f;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -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) {
|
||||
|
||||
@ -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",
|
||||
|
||||
@ -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",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user