Browse Source

[unity] Timeline: Fixed Inspector cutting off last three parameters. Updated documentation and package version for commit a7752095. See #1933, see #1807.

Harald Csaszar 4 years ago
parent
commit
32165703b9

+ 2 - 2
CHANGELOG.md

@@ -106,7 +106,7 @@
   * **Corrected all `Outline` shaders outline thickness** when `Advanced - Sample 8 Neighbourhood` is disabled (thus using `4 Neighbourhood`). Previously weighting was incorrectly thick (4x as thick) compared to 8 neighbourhood, now it is more consistent. This might require adjustment of all your outline materials where `Sample 8 Neighbourhood` is disabled to restore the previous outline thickness, by adjusting the `Outline Threshold` parameter through adding a `/4` to make the threshold 4 times smaller.
   * Reverted changes: `BoneFollower` property `followLocalScale` has intermediately been renamed to `followScale` but was renamed back to `followLocalScale`. Serialized values (scenes and prefabs) will automatically be upgraded, only code accessing `followScale` needs to be adapted.
   * Fixed Timeline not pausing (and resuming) clip playback on Director pause, this is now the default behaviour. If you require the old behaviour (e.g. to continue playing an idle animation during Director pause), there is now an additional parameter `Don't Pause with Director` provided that can be enabled for each Timeline clip.
-  * Timeline clips now also offer a `Don't Pause on Stop` parameter in addition to `Don't Pause with Director` for partially keeping old pause behaviour. This allows to continue playback after the Graph has stopped (when the Track has ended) when `Don't Pause with Director` is disabled. When `Don't Pause with Director` is enabled, this parameter has no effect.
+  * Fixed Timeline `Spine AnimationState Clips` ignoring empty space on the Timeline after a clip's end. Timeline clips now also offer `Don't End with Clip` and `Clip End Mix Out Duration` parameters if you prefer the old behaviour of previous versions. By default when empty space follows the clip on the timeline, the empty animation is set on the track with a MixDuration of `Clip End Mix Out Duration`. Set `Don't End with Clip` to true to continue playing the clip's animation instead and mimic the old 3.8 behaviour. If you prefer pausing the animation instead of mixing out to the empty animation, set `Clip End Mix Out Duration` to a value less than 0, then the animation is paused instead.
   
 * **Additions**
   * Additional **Fix Draw Order** parameter at SkeletonRenderer, defaults to `disabled` (previous behaviour).
@@ -153,7 +153,7 @@
   * `SkeletonRagdoll` and `SkeletonRagdoll2D` now support bone scale at any bone in the skeleton hierarchy. This includes negative scale and root bone scale.
   * `Attachment.GetRemappedClone(Sprite)` method now provides an additional optional parameter `useOriginalRegionScale`. When set to `true`, the replaced attachment's scale is used instead of the Sprite's `Pixel per Unity` setting, allowing for more consistent scaling. *Note:* When remapping Sprites, be sure to set the Sprite's `Mesh Type` to `Full Rect` and not `Tight`, otherwise the scale will be wrong.
   * `SkeletonGraphic` now **supports all Slot blend modes** when `Advanced - Multiple Canvas Renderers` is enabled in the Inspector. The `SkeletonGraphic` Inspector now provides a `Blend Mode Materials` section where you can assign `SkeletonGraphic` materials for each blend mode, or use the new default materials. New `SkeletonGraphic` shaders and materials have been added for each blend mode. The `BlendModes.unity` example scene has been extended to demonstrate this new feature. For detailed information see the [`SkeletonGraphic documentation page`](http://esotericsoftware.com/spine-unity#Parameters).
-  * Timeline clips now also offer a `Don't Pause on Stop` parameter in addition to `Don't Pause with Director` for partially keeping old pause behaviour. This allows to continue playback after the Graph has stopped (when the Track has ended) when `Don't Pause with Director` is disabled. When `Don't Pause with Director` is enabled, this parameter has no effect.
+  * Timeline clips now also offer `Don't End with Clip` and `Clip End Mix Out Duration` parameters. By default when empty space follows the clip on the timeline, the empty animation is set on the track with a MixDuration of `Clip End Mix Out Duration`. Set `Don't End with Clip` to true to continue playing the clip's animation instead and mimic the old 3.8 behaviour. If you prefer pausing the animation instead of mixing out to the empty animation, set `Clip End Mix Out Duration` to a value less than 0, then the animation is paused instead.
 
 * **Changes of default values**
 

+ 28 - 22
spine-unity/Modules/com.esotericsoftware.spine.timeline/Documentation/README.md

@@ -1,12 +1,12 @@
 The latest version of this documentation can also be found at the [spine-unity Runtime Documentation](http://esotericsoftware.com/spine-unity#Timeline-Extension-UPM-Package) webpage.
 
-# Timeline Extension UPM Package
+## Timeline Extension UPM Package
 
 ![](timeline.png)
 
-Timeline support is provided as a separate UPM (Unity Package Manager) package. See section [Optional Extension UPM Packages](http://esotericsoftware.com/spine-unity#Optional-Extension-UPM-Packages) on how to download and install this package and section [Updating an Extension UPM Package](http://esotericsoftware.com/spine-unity#Updating-an-Extension-UPM-Package) on how to update it.
+Timeline support is provided as a separate UPM (Unity Package Manager) package. See section [Optional Extension UPM Packages](#Optional-Extension-UPM-Packages) on how to download and install this package and section [Updating an Extension UPM Package](#Updating-an-Extension-UPM-Package) on how to update it.
 
-## Spine-Unity Timeline Playables
+### Spine-Unity Timeline Playables
 
 ![](add-menu.png)
 
@@ -15,9 +15,9 @@ Spine Timeline currently provides three types of Timeline Playables:
 - `Spine AnimationState Graphic Track` *(for `SkeletonGraphic`)*,
 - `Spine Skeleton Flip Track` *(for both `SkeletonAnimation` and `SkeletonGraphic`)*.
 
-**Limitations:** currently only [SkeletonAnimation](http://esotericsoftware.com/spine-unity#SkeletonAnimation-Component) and [SkeletonGraphic](http://esotericsoftware.com/spine-unity#SkeletonGraphic-Component) are supported. There is currently no Timeline support for [SkeletonMecanim](http://esotericsoftware.com/spine-unity#SkeletonMecanim-Component).
+**Limitations:** currently only [SkeletonAnimation](#SkeletonAnimation-Component) and [SkeletonGraphic](#SkeletonGraphic-Component) are supported. There is currently no Timeline support for [SkeletonMecanim](#SkeletonMecanim-Component).
 
-### Spine AnimationState Track
+#### Spine AnimationState Track
 
 ![](animationstate-track.png)  
 
@@ -29,16 +29,24 @@ This track type can be used to set animations at the AnimationState of the targe
 - *Track Index.* The target AnimationState track index to set animations at. Do not forget to set this value accordingly when using multiple timeline tracks.
 > **Important Note:** Currently it is required to order the timeline tracks with base track at the top and overlay tracks below, otherwise the Editor Preview will display incorrect results.
 
-#### Spine Animation State Clip
+##### Spine Animation State Clip
 
-You can add a `Spine Animation State Clip` to a `Spine AnimationState Track` (or `Spine AnimationState Graphic Track`) by dragging an `AnimationReferenceAsset` onto a Timeline track. See the [SkeletonData - Preview](http://esotericsoftware.com/spine-unity#Preview) section on how to generate `AnimationReferenceAssets` for a `SkeletonDataAsset`.
+You can add a `Spine Animation State Clip` to a `Spine AnimationState Track` (or `Spine AnimationState Graphic Track`) by dragging an `AnimationReferenceAsset` onto a Timeline track. See the [SkeletonData - Preview](#Preview) section on how to generate `AnimationReferenceAssets` for a `SkeletonDataAsset`.
 
 ![](animationstate-clip-inspector.png)  
 
-**Parameters**
+**Parameters**  
+*Clip Timing*
 - *Clip In.* An initial local start time offset applied when playing this animation. Can also be adjusted by dragging the left edge of the clip.
-- *Ease In Duration.* Blend transition duration used when `Use Blend Duration` and `Custom duration` are enabled. Can be adjusted by  moving the clip into the previous clip, resulting in a cross-fade triangle at the transition.
+- *Blend In Duration.* Blend transition duration used when `Use Blend Duration` and `Custom duration` are enabled. Can be adjusted by  moving the clip into the previous clip, resulting in a cross-fade triangle at the transition.
 - *Speed Multiplier.* Playback speed multiplier. When set to 2.0 it will play the animation twice as fast, when set to 0.5 half as fast.
+
+*Spine Animation State Clip*
+- *Don't Pause with Director.* If set to true, the animation will continue playing when the Director is paused.
+- *Don't End with Clip.* Normally when empty space follows the clip on the timeline, the empty animation is set on the track. Set this parameter to  true to continue playing the clip's animation instead.
+- *Clip End Mix Out Duration.* When `Don't End with Clip` is false, and the clip is followed by blank space or stopped, the empty animation is set with this `MixDuration`. When set to a value less than 0, the clip is paused instead.
+
+*Mixing Setting*
 - *Custom duration.* When enabled, the value under `Mix Duration` below is used for transitions from the previous animation to this animation. When disabled, it will use the setup `Mix Duration` value at the SkeletonData asset for the animation pair.
 - *Use Blend Duration.* When enabled, the value under `Mix Duration` will be synced with the timeline clip transition duration 'Ease In Duration'. Enable this value to adjust transition durations by moving the clip into the previous clip, resulting in a cross-fade triangle at the transition.
 - *Mix Duration.* When *Custom duration* is enabled, this mix duration is used for transitions from the previous animation to this animation.
@@ -46,35 +54,36 @@ You can add a `Spine Animation State Clip` to a `Spine AnimationState Track` (or
 - *Attachment Threshold.* See [TrackEntry.AttachmentThreshold](http://esotericsoftware.com/spine-api-reference#TrackEntry-attachmentThreshold).
 - *Draw Order Threshold.* See [TrackEntry.DrawOrderThreshold](http://esotericsoftware.com/spine-api-reference#TrackEntry-drawOrderThreshold).
 
-**Ignored Parameters**  
+*Ignored Parameters*
 - *Ease Out Duration, Blend Curves*. These parameters are ignored and have no effect.
 
 **Usage**
 1. Add `SkeletonAnimationPlayableHandle` component to your SkeletonAnimation GameObject, or the `SkeletonGraphicPlayableHandle` in case of `SkeletonGraphic`.
 2. With an existing Unity Playable Director, and in the Unity Timeline window, right-click on an empty space on the left and choose `Spine.Unity.Playables` - `Spine Animation State Track`.
 3. Drag the SkeletonAnimation or SkeletonGraphic GameObject onto the empty reference property of the new Spine AnimationState Track.
-4. To add an animation at a track, drag the respective [`AnimationReferenceAsset`](http://esotericsoftware.com/spine-unity#Preview) into the clips view (the right part of the Timeline panel) as you would with normal animation clips.
+4. To add an animation at a track, drag the respective [`AnimationReferenceAsset`](#Preview) into the clips view (the right part of the Timeline panel) as you would with normal animation clips.
 
-See spine-unity Runtime Documentation, [section Preview](http://esotericsoftware.com/spine-unity#Preview) on how to create an `AnimationReferenceAsset` for each of your animations.
+See spine-unity Runtime Documentation, [section Preview](#Preview) on how to create an `AnimationReferenceAsset` for each of your animations.
 
 > **Note:** You can use the Duplicate function (`CTRL`/`CMD` + `D`) to duplicate selected clips in the clips view.
 
 **Track Behavior**
-- `AnimationState.SetAnimation` will be called at the beginning of every clip based on the `AnimationReferenceAsset`.
-- Clip durations don't matter. Animations won't be cleared where there is no active clip at certain slices of time.
+- `AnimationState.SetAnimation()` will be called at the beginning of every clip based on the `AnimationReferenceAsset`.
+- Clip durations matter since Timeline version 4.0.
+	> Note: Behaviour of version 3.8 was that clip durations don't matter. Animations were not cleared when reaching empty space after a clip on the timeline.
 - Empty animation: If a clip has no `AnimationReferenceAsset` assigned, it will call `SetEmptyAnimation` instead.
 - Error handling: If the animation with the provided `AnimationReferenceAsset` is not found, it will do nothing (the previous animation will continue playing normally).
 - Animations playing before the timeline starts playing will not be interrupted until the first clip starts playing.
-- At the end of the last clip and at the end of the timeline, nothing happens. This means the effect of the last clip's `SetAnimation` call will persist until you issue other calls at the AnimationState.
+- What happens at the end of clips and at the end of the timeline depends on clip settings. When `Don't End with Clip` is true, nothing happens at the clip's end. This means the effect of the last clip's `SetAnimation` call will persist until you issue other calls at the AnimationState. If `Don't End with Clip` is false, it will be mix out to the empty animation with duration `Clip End Mix Out Duration`, or paused when `Clip End Mix Out Duration` is less than 0.
 - Edit mode preview mixing may look different from Play Mode mixing. Please check in actual Play Mode to see the actual results. Please see the remark in the  [Spine AnimationState Track](#Spine-AnimationState-Track) section on correct track ordering when previewing multiple overlaid tracks.
 
-### Spine Skeleton Flip Track
+#### Spine Skeleton Flip Track
 
 ![](skeleton-flip-track.png)  
 
 This track type can be used to flip the skeleton of the target `SkeletonAnimation` or `SkeletonGraphic`.
 
-#### Spine Skeleton Flip Clip
+##### Spine Skeleton Flip Clip
 
 ![](skeleton-flip-clip-inspector.png)  
 
@@ -93,8 +102,5 @@ This track type can be used to flip the skeleton of the target `SkeletonAnimatio
 - The specified skeleton flip values will be applied for every frame within the duration of each track.
 - At the end of the timeline, the track will revert the skeleton flip to the flip values it captures when it starts playing that timeline. 
 
-### Known Issues
-- The Console potentially logs an incorrect and harmless error `DrivenPropertyManager has failed to register property "m_Script" of object "Spine GameObject (spineboy-pro)" with driver "" because the property doesn't exist.`. This is a known issue on Unity's end. See more here: https://forum.unity.com/threads/default-playables-text-switcher-track-error.502903/
-- These Spine Tracks (like other custom Unity Timeline Playable types) do not have labels on them. Unity currently doesn't have API to specify their labels yet.
-- Each track clip currently requires you to specify a reference to SkeletonData so its inspector can show you a convenient list of animation names. This is because track clips are agnostic of its track and target component/track binding, and provides no way of automatically finding it while in the editor. The clips will still function correctly without the SkeletonDataAsset references; you just won't get the dropdown of animation names in the editor.
-- Each track clip cannot be automatically named based on the chosen animationName. The Timeline object editors currently doesn't provide access to the clip names to do this automatically.
+#### Known Issues
+- The Console potentially logs an incorrect and harmless error `DrivenPropertyManager has failed to register property "m_Script" of object "Spine GameObject (spineboy-pro)" with driver "" because the property doesn't exist.`. This is a known issue on Unity's end. See more here: https://forum.unity.com/threads/default-playables-text-switcher-track-error.502903/

BIN
spine-unity/Modules/com.esotericsoftware.spine.timeline/Documentation/animationstate-clip-inspector.png


+ 1 - 1
spine-unity/Modules/com.esotericsoftware.spine.timeline/Editor/SpineAnimationStateDrawer.cs

@@ -38,7 +38,7 @@ using Spine.Unity.Editor;
 public class SpineAnimationStateDrawer : PropertyDrawer {
 
 	public override float GetPropertyHeight (SerializedProperty property, GUIContent label) {
-		const int fieldCount = 11;
+		const int fieldCount = 15;
 		return fieldCount * EditorGUIUtility.singleLineHeight;
 	}
 

+ 1 - 1
spine-unity/Modules/com.esotericsoftware.spine.timeline/package.json

@@ -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, version 4.0.\n(See http://esotericsoftware.com/git/spine-runtimes/spine-unity)",
-	"version": "4.0.4",
+	"version": "4.0.5",
 	"unity": "2018.3",
 	"author": {
 		"name": "Esoteric Software",