diff --git a/CHANGELOG.md b/CHANGELOG.md index f5739e836..a80ba455c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -110,7 +110,7 @@ * 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. * 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** +* **Additions and Improvements** * Additional **Fix Draw Order** parameter at SkeletonRenderer, defaults to `disabled` (previous behaviour). Applies only when 3+ submeshes are used (2+ materials with alternating order, e.g. "A B A"). If `true`, MaterialPropertyBlocks are assigned at each material to prevent aggressive batching of submeshes @@ -161,6 +161,8 @@ * `BoundingBoxFollower` and `BoundingBoxFollowerGraphic` now provide previously missing `usedByEffector` and `usedByComposite` parameters to be set at all generated colliders. * `BoneFollower` and `BoneFollowerGraphic` now provide an additional `Follow Parent World Scale` parameter to allow following simple scale of parent bones (rotated/skewed scale can't be supported). * Improved `Advanced - Fix Prefab Override MeshFilter` property for `SkeletonRenderer` (and subclasses`SkeletonAnimation` and `SkeletonMecanim`), now providing an additional option to use a global value which can be set in `Edit - Preferences - Spine`. + * Timeline naming improvements: `Spine AnimationState Clip` Inspector parameter `Custom Duration` changed and inverted to `Default Mix Duration` for more clarity. Shortened all Timeline add track menu entries from: `Spine.Unity.Playables - ` to `Spine - `, `Spine Animation State Track` to `SkeletonAnimation Track`, `Spine AnimationState Graphic Track` to `SkeletonGraphic Track`, and `Spine Skeleton Flip Track` to `Skeleton Flip Track`. + * 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. * **Changes of default values** diff --git a/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Asset Types/AnimationReferenceAssetEditor.cs b/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Asset Types/AnimationReferenceAssetEditor.cs index 2dc434f14..9ec286b0e 100644 --- a/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Asset Types/AnimationReferenceAssetEditor.cs +++ b/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Asset Types/AnimationReferenceAssetEditor.cs @@ -28,8 +28,6 @@ *****************************************************************************/ using System; -using System.Collections; -using System.Collections.Generic; using System.Reflection; using UnityEditor; using UnityEngine; @@ -40,7 +38,7 @@ namespace Spine.Unity.Editor { [CustomEditor(typeof(AnimationReferenceAsset))] public class AnimationReferenceAssetEditor : Editor { - const string InspectorHelpText = "This is a Spine-Unity Animation Reference Asset. It serializes a reference to a SkeletonDataAsset and an animationName. It does not contain actual animation data. At runtime, it stores a reference to a Spine.Animation.\n\n" + + const string InspectorHelpText = "This is a Spine-Unity Animation Reference Asset. It serializes a reference to a SkeletonData asset and an animationName. It does not contain actual animation data. At runtime, it stores a reference to a Spine.Animation.\n\n" + "You can use this in your AnimationState calls instead of a string animation name or a Spine.Animation reference. Use its implicit conversion into Spine.Animation or its .Animation property.\n\n" + "Use AnimationReferenceAssets as an alternative to storing strings or finding animations and caching per component. This only does the lookup by string once, and allows you to store and manage animations via asset references."; diff --git a/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Asset Types/SkeletonDataAssetInspector.cs b/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Asset Types/SkeletonDataAssetInspector.cs index 77a416935..18740d5b6 100644 --- a/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Asset Types/SkeletonDataAssetInspector.cs +++ b/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Asset Types/SkeletonDataAssetInspector.cs @@ -221,7 +221,7 @@ namespace Spine.Unity.Editor { DrawAnimationList(); if (targetSkeletonData.Animations.Count > 0) { const string AnimationReferenceButtonText = "Create Animation Reference Assets"; - const string AnimationReferenceTooltipText = "AnimationReferenceAsset acts as Unity asset for a reference to a Spine.Animation. This can be used in inspectors.\n\nIt serializes a reference to a SkeletonDataAsset and an animationName.\n\nAt runtime, a reference to its Spine.Animation is loaded and cached into the object to be used as needed. This skips the need to find and cache animation references in individual MonoBehaviours."; + const string AnimationReferenceTooltipText = "AnimationReferenceAsset acts as Unity asset for a reference to a Spine.Animation. This can be used in inspectors.\n\nIt serializes a reference to a SkeletonData asset and an animationName.\n\nAt runtime, a reference to its Spine.Animation is loaded and cached into the object to be used as needed. This skips the need to find and cache animation references in individual MonoBehaviours."; if (GUILayout.Button(SpineInspectorUtility.TempContent(AnimationReferenceButtonText, Icons.animationRoot, AnimationReferenceTooltipText), GUILayout.Width(250), GUILayout.Height(26))) { CreateAnimationReferenceAssets(); } @@ -672,7 +672,7 @@ namespace Spine.Unity.Editor { #if SPINE_TK2D if (missingPaths.Count > 0) - warnings.Add("Missing regions. SkeletonDataAsset requires tk2DSpriteCollectionData or Spine AtlasAssets."); + warnings.Add("Missing regions. SkeletonData asset requires tk2DSpriteCollectionData or Spine AtlasAssets."); #endif } diff --git a/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Components/BoneFollowerGraphicInspector.cs b/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Components/BoneFollowerGraphicInspector.cs index b642f77c9..9c2ddff95 100644 --- a/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Components/BoneFollowerGraphicInspector.cs +++ b/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Components/BoneFollowerGraphicInspector.cs @@ -27,7 +27,6 @@ * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *****************************************************************************/ -using Spine.Unity; using UnityEditor; using UnityEngine; @@ -193,7 +192,7 @@ namespace Spine.Unity.Editor { EditorGUILayout.HelpBox("Assigned SkeletonGraphic does not have SkeletonData assigned to it.", MessageType.Warning); if (!boneFollowerSkeletonGraphic.IsValid) - EditorGUILayout.HelpBox("Assigned SkeletonGraphic is invalid. Check target SkeletonGraphic, its SkeletonDataAsset or the console for other errors.", MessageType.Warning); + EditorGUILayout.HelpBox("Assigned SkeletonGraphic is invalid. Check target SkeletonGraphic, its SkeletonData asset or the console for other errors.", MessageType.Warning); } } diff --git a/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Components/BoneFollowerInspector.cs b/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Components/BoneFollowerInspector.cs index ab730166c..a3d2ced65 100644 --- a/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Components/BoneFollowerInspector.cs +++ b/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Components/BoneFollowerInspector.cs @@ -199,7 +199,7 @@ namespace Spine.Unity.Editor { EditorGUILayout.HelpBox("Assigned SkeletonRenderer does not have SkeletonData assigned to it.", MessageType.Warning); if (!boneFollowerSkeletonRenderer.valid) - EditorGUILayout.HelpBox("Assigned SkeletonRenderer is invalid. Check target SkeletonRenderer, its SkeletonDataAsset or the console for other errors.", MessageType.Warning); + EditorGUILayout.HelpBox("Assigned SkeletonRenderer is invalid. Check target SkeletonRenderer, its SkeletonData asset or the console for other errors.", MessageType.Warning); } } diff --git a/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Components/SkeletonGraphicInspector.cs b/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Components/SkeletonGraphicInspector.cs index 584925296..c455f0d73 100644 --- a/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Components/SkeletonGraphicInspector.cs +++ b/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Components/SkeletonGraphicInspector.cs @@ -156,13 +156,13 @@ namespace Spine.Unity.Editor { } if (thisSkeletonGraphic.skeletonDataAsset == null) { - EditorGUILayout.HelpBox("You need to assign a SkeletonDataAsset first.", MessageType.Info); + EditorGUILayout.HelpBox("You need to assign a SkeletonData asset first.", MessageType.Info); serializedObject.ApplyModifiedProperties(); serializedObject.Update(); return; } if (!SpineEditorUtilities.SkeletonDataAssetIsValid(thisSkeletonGraphic.skeletonDataAsset)) { - EditorGUILayout.HelpBox("Skeleton Data Asset error. Please check Skeleton Data Asset.", MessageType.Error); + EditorGUILayout.HelpBox("SkeletonData asset error. Please check SkeletonData asset.", MessageType.Error); return; } diff --git a/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Components/SkeletonRendererInspector.cs b/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Components/SkeletonRendererInspector.cs index 6bef733cd..93b897a69 100644 --- a/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Components/SkeletonRendererInspector.cs +++ b/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Components/SkeletonRendererInspector.cs @@ -291,12 +291,12 @@ namespace Spine.Unity.Editor { } if (component.skeletonDataAsset == null) { - EditorGUILayout.HelpBox("Skeleton Data Asset required", MessageType.Warning); + EditorGUILayout.HelpBox("SkeletonData asset required", MessageType.Warning); return; } if (!SpineEditorUtilities.SkeletonDataAssetIsValid(component.skeletonDataAsset)) { - EditorGUILayout.HelpBox("Skeleton Data Asset error. Please check Skeleton Data Asset.", MessageType.Error); + EditorGUILayout.HelpBox("SkeletonData asset error. Please check SkeletonData asset.", MessageType.Error); return; } diff --git a/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Components/SkeletonUtilityInspector.cs b/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Components/SkeletonUtilityInspector.cs index 1447df8a0..f73ad1e68 100644 --- a/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Components/SkeletonUtilityInspector.cs +++ b/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Components/SkeletonUtilityInspector.cs @@ -31,11 +31,8 @@ #define NEW_PREFAB_SYSTEM #endif -using Spine; -using System.Collections.Generic; using System.Reflection; using UnityEditor; -using UnityEditor.AnimatedValues; using UnityEngine; namespace Spine.Unity.Editor { @@ -93,7 +90,7 @@ namespace Spine.Unity.Editor { if ((skeletonRenderer != null && !skeletonRenderer.valid) || (skeletonGraphic != null && !skeletonGraphic.IsValid)) { - GUILayout.Label(new GUIContent("Spine Component invalid. Check Skeleton Data Asset.", Icons.warning)); + GUILayout.Label(new GUIContent("Spine Component invalid. Check SkeletonData asset.", Icons.warning)); return; } diff --git a/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Utility/BlendModeMaterialsUtility.cs b/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Utility/BlendModeMaterialsUtility.cs index e2e3b2cb2..8fc2eeee3 100644 --- a/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Utility/BlendModeMaterialsUtility.cs +++ b/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Utility/BlendModeMaterialsUtility.cs @@ -143,7 +143,7 @@ namespace Spine.Unity.Editor { SkeletonDataAsset skeletonDataAsset) { skeletonDataAsset.skeletonDataModifiers.Remove(modifierAsset); - Debug.Log(string.Format("BlendModeMaterialsAsset upgraded to built-in BlendModeMaterials at SkeletonDataAsset '{0}'.", + Debug.Log(string.Format("BlendModeMaterialsAsset upgraded to built-in BlendModeMaterials at SkeletonData asset '{0}'.", skeletonDataAsset.name), skeletonDataAsset); EditorUtility.SetDirty(skeletonDataAsset); } @@ -212,11 +212,11 @@ namespace Spine.Unity.Editor { replacementMaterials.Add(replacement); anyReplacementMaterialsChanged = true; if (createdNewMaterial) { - Debug.Log(string.Format("Created blend mode Material '{0}' for SkeletonDataAsset '{1}'.", + Debug.Log(string.Format("Created blend mode Material '{0}' for SkeletonData asset '{1}'.", replacement.material.name, skeletonDataAsset), replacement.material); } } else { - Debug.LogError(string.Format("Failed creating blend mode Material for SkeletonDataAsset '{0}'," + + Debug.LogError(string.Format("Failed creating blend mode Material for SkeletonData asset '{0}'," + " atlas page '{1}', template '{2}'.", skeletonDataAsset.name, originalRegion.page.name, materialTemplate.name), skeletonDataAsset); diff --git a/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Windows/SkeletonBaker.cs b/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Windows/SkeletonBaker.cs index 284cc803a..c2e1469ab 100644 --- a/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Windows/SkeletonBaker.cs +++ b/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Windows/SkeletonBaker.cs @@ -33,14 +33,10 @@ #define SPINE_SKELETONMECANIM -using Spine; -using System.Collections; using System.Collections.Generic; using System.IO; using System.Linq; -using System.Reflection; using UnityEditor; -using UnityEditorInternal; using UnityEngine; namespace Spine.Unity.Editor { @@ -181,7 +177,7 @@ namespace Spine.Unity.Editor { public static void BakeToPrefab (SkeletonDataAsset skeletonDataAsset, ExposedList skins, string outputPath = "", bool bakeAnimations = true, bool bakeIK = true, SendMessageOptions eventOptions = SendMessageOptions.DontRequireReceiver) { if (skeletonDataAsset == null || skeletonDataAsset.GetSkeletonData(true) == null) { - Debug.LogError("Could not export Spine Skeleton because SkeletonDataAsset is null or invalid!"); + Debug.LogError("Could not export Spine Skeleton because SkeletonData Asset is null or invalid!"); return; } diff --git a/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Windows/SpinePreferences.cs b/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Windows/SpinePreferences.cs index 84b7fd573..5683e5398 100644 --- a/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Windows/SpinePreferences.cs +++ b/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Windows/SpinePreferences.cs @@ -232,7 +232,7 @@ namespace Spine.Unity.Editor { #endif } - EditorGUILayout.PropertyField(settings.FindProperty("autoReloadSceneSkeletons"), new GUIContent("Auto-reload scene components", "Reloads Skeleton components in the scene whenever their SkeletonDataAsset is modified. This makes it so changes in the SkeletonDataAsset inspector are immediately reflected. This may be slow when your scenes have large numbers of SkeletonRenderers or SkeletonGraphic.")); + EditorGUILayout.PropertyField(settings.FindProperty("autoReloadSceneSkeletons"), new GUIContent("Auto-reload scene components", "Reloads Skeleton components in the scene whenever their SkeletonDataAsset is modified. This makes it so changes in the SkeletonData asset inspector are immediately reflected. This may be slow when your scenes have large numbers of SkeletonRenderers or SkeletonGraphic.")); EditorGUILayout.Separator(); EditorGUILayout.LabelField("Auto-Import Settings", EditorStyles.boldLabel); diff --git a/spine-unity/Modules/com.esotericsoftware.spine.timeline/Editor/SpineAnimationStateDrawer.cs b/spine-unity/Modules/com.esotericsoftware.spine.timeline/Editor/SpineAnimationStateDrawer.cs index 268d60848..7fc823add 100644 --- a/spine-unity/Modules/com.esotericsoftware.spine.timeline/Editor/SpineAnimationStateDrawer.cs +++ b/spine-unity/Modules/com.esotericsoftware.spine.timeline/Editor/SpineAnimationStateDrawer.cs @@ -27,8 +27,6 @@ * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *****************************************************************************/ -using Spine; -using Spine.Unity; using Spine.Unity.Editor; using Spine.Unity.Playables; using UnityEditor; @@ -100,7 +98,10 @@ public class SpineAnimationStateDrawer : PropertyDrawer { EditorGUI.LabelField(singleFieldRect, "Mixing Settings", EditorStyles.boldLabel); singleFieldRect.y += lineHeightWithSpacing; - EditorGUI.PropertyField(singleFieldRect, customDurationProp); + customDurationProp.boolValue = !EditorGUI.Toggle(singleFieldRect, + new GUIContent("Default Mix Duration", + "Use the default mix duration as specified at the SkeletonDataAsset."), + !customDurationProp.boolValue); bool greyOutCustomDurations = (!customDurationProp.hasMultipleDifferentValues && customDurationProp.boolValue == false); diff --git a/spine-unity/Modules/com.esotericsoftware.spine.timeline/Editor/SpineAnimationStateGraphicTrackInspector.cs b/spine-unity/Modules/com.esotericsoftware.spine.timeline/Editor/SpineAnimationStateGraphicTrackInspector.cs index 342e48cda..dd362abcf 100644 --- a/spine-unity/Modules/com.esotericsoftware.spine.timeline/Editor/SpineAnimationStateGraphicTrackInspector.cs +++ b/spine-unity/Modules/com.esotericsoftware.spine.timeline/Editor/SpineAnimationStateGraphicTrackInspector.cs @@ -29,24 +29,21 @@ using Spine.Unity.Playables; using UnityEditor; +using UnityEditor.Timeline; +using UnityEngine; using UnityEngine.Timeline; namespace Spine.Unity.Editor { - [CustomEditor(typeof(SpineAnimationStateGraphicTrack))] + [CustomTimelineEditor(typeof(SpineAnimationStateGraphicTrack))] [CanEditMultipleObjects] - public class SpineAnimationStateGraphicTrackInspector : UnityEditor.Editor { + public class SpineAnimationStateGraphicTrackInspector : TrackEditor { - protected SerializedProperty trackIndexProperty = null; - - public void OnEnable () { - trackIndexProperty = serializedObject.FindProperty("trackIndex"); - } - - public override void OnInspectorGUI () { - serializedObject.Update(); - EditorGUILayout.PropertyField(trackIndexProperty); - serializedObject.ApplyModifiedProperties(); + public override TrackDrawOptions GetTrackOptions (TrackAsset track, UnityEngine.Object binding) { + var options = base.GetTrackOptions(track, binding); + options.icon = SpineEditorUtilities.Icons.skeletonDataAssetIcon; + options.trackColor = new Color(255 / 255.0f, 64 / 255.0f, 1 / 255.0f); + return options; } } } diff --git a/spine-unity/Modules/com.esotericsoftware.spine.timeline/Editor/SpineAnimationStateTrackInspector.cs b/spine-unity/Modules/com.esotericsoftware.spine.timeline/Editor/SpineAnimationStateTrackInspector.cs index e65391d11..8cf515804 100644 --- a/spine-unity/Modules/com.esotericsoftware.spine.timeline/Editor/SpineAnimationStateTrackInspector.cs +++ b/spine-unity/Modules/com.esotericsoftware.spine.timeline/Editor/SpineAnimationStateTrackInspector.cs @@ -29,24 +29,20 @@ using Spine.Unity.Playables; using UnityEditor; +using UnityEditor.Timeline; +using UnityEngine; using UnityEngine.Timeline; namespace Spine.Unity.Editor { - - [CustomEditor(typeof(SpineAnimationStateTrack))] + [CustomTimelineEditor(typeof(SpineAnimationStateTrack))] [CanEditMultipleObjects] - public class SpineAnimationStateTrackInspector : UnityEditor.Editor { + public class SpineAnimationStateTrackInspector : TrackEditor { - protected SerializedProperty trackIndexProperty = null; - - public void OnEnable () { - trackIndexProperty = serializedObject.FindProperty("trackIndex"); - } - - public override void OnInspectorGUI () { - serializedObject.Update(); - EditorGUILayout.PropertyField(trackIndexProperty); - serializedObject.ApplyModifiedProperties(); + public override TrackDrawOptions GetTrackOptions (TrackAsset track, UnityEngine.Object binding) { + var options = base.GetTrackOptions(track, binding); + options.icon = SpineEditorUtilities.Icons.skeletonDataAssetIcon; + options.trackColor = new Color(255 / 255.0f, 64 / 255.0f, 1 / 255.0f); + return options; } } } diff --git a/spine-unity/Modules/com.esotericsoftware.spine.timeline/Editor/SpineSkeletonFlipTrackInspector.cs b/spine-unity/Modules/com.esotericsoftware.spine.timeline/Editor/SpineSkeletonFlipTrackInspector.cs new file mode 100644 index 000000000..041260ec4 --- /dev/null +++ b/spine-unity/Modules/com.esotericsoftware.spine.timeline/Editor/SpineSkeletonFlipTrackInspector.cs @@ -0,0 +1,48 @@ +/****************************************************************************** + * Spine Runtimes License Agreement + * Last updated January 1, 2020. Replaces all prior versions. + * + * Copyright (c) 2013-2020, Esoteric Software LLC + * + * Integration of the Spine Runtimes into software or otherwise creating + * derivative works of the Spine Runtimes is permitted under the terms and + * conditions of Section 2 of the Spine Editor License Agreement: + * http://esotericsoftware.com/spine-editor-license + * + * Otherwise, it is permitted to integrate the Spine Runtimes into software + * or otherwise create derivative works of the Spine Runtimes (collectively, + * "Products"), provided that each user of the Products must obtain their own + * Spine Editor license and redistribution of the Products in any form must + * include this license and copyright notice. + * + * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, + * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +using Spine.Unity.Playables; +using UnityEditor; +using UnityEditor.Timeline; +using UnityEngine; +using UnityEngine.Timeline; + +namespace Spine.Unity.Editor { + [CustomTimelineEditor(typeof(SpineSkeletonFlipTrack))] + [CanEditMultipleObjects] + public class SpineSkeletonFlipTrackInspector : TrackEditor { + + public override TrackDrawOptions GetTrackOptions (TrackAsset track, UnityEngine.Object binding) { + var options = base.GetTrackOptions(track, binding); + options.icon = SpineEditorUtilities.Icons.subMeshRenderer; + options.trackColor = new Color(53 / 255.0f, 58 / 255.0f, 62 / 255.0f); + return options; + } + } +} diff --git a/spine-unity/Modules/com.esotericsoftware.spine.timeline/Editor/SpineSkeletonFlipTrackInspector.cs.meta b/spine-unity/Modules/com.esotericsoftware.spine.timeline/Editor/SpineSkeletonFlipTrackInspector.cs.meta new file mode 100644 index 000000000..66b8878fe --- /dev/null +++ b/spine-unity/Modules/com.esotericsoftware.spine.timeline/Editor/SpineSkeletonFlipTrackInspector.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 79b46a12efaac314eaf936caf1f3aee9 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/spine-unity/Modules/com.esotericsoftware.spine.timeline/Runtime/SpineAnimationState/SpineAnimationStateGraphicTrack.cs b/spine-unity/Modules/com.esotericsoftware.spine.timeline/Runtime/SpineAnimationState/SpineAnimationStateGraphicTrack.cs index 4850f5fe0..97e86ac32 100644 --- a/spine-unity/Modules/com.esotericsoftware.spine.timeline/Runtime/SpineAnimationState/SpineAnimationStateGraphicTrack.cs +++ b/spine-unity/Modules/com.esotericsoftware.spine.timeline/Runtime/SpineAnimationState/SpineAnimationStateGraphicTrack.cs @@ -27,6 +27,9 @@ * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *****************************************************************************/ +#if UNITY_EDITOR +using System.ComponentModel; +#endif using UnityEngine; using UnityEngine.Playables; using UnityEngine.Timeline; @@ -35,6 +38,9 @@ namespace Spine.Unity.Playables { [TrackColor(0.9960785f, 0.2509804f, 0.003921569f)] [TrackClipType(typeof(SpineAnimationStateClip))] [TrackBindingType(typeof(SkeletonGraphic))] +#if UNITY_EDITOR + [DisplayName("Spine/SkeletonGraphic Track")] +#endif public class SpineAnimationStateGraphicTrack : TrackAsset { public int trackIndex = 0; diff --git a/spine-unity/Modules/com.esotericsoftware.spine.timeline/Runtime/SpineAnimationState/SpineAnimationStateTrack.cs b/spine-unity/Modules/com.esotericsoftware.spine.timeline/Runtime/SpineAnimationState/SpineAnimationStateTrack.cs index 502234ee9..a84a0737e 100644 --- a/spine-unity/Modules/com.esotericsoftware.spine.timeline/Runtime/SpineAnimationState/SpineAnimationStateTrack.cs +++ b/spine-unity/Modules/com.esotericsoftware.spine.timeline/Runtime/SpineAnimationState/SpineAnimationStateTrack.cs @@ -27,6 +27,9 @@ * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *****************************************************************************/ +#if UNITY_EDITOR +using System.ComponentModel; +#endif using System.Collections.Generic; using UnityEngine; using UnityEngine.Playables; @@ -36,6 +39,9 @@ namespace Spine.Unity.Playables { [TrackColor(0.9960785f, 0.2509804f, 0.003921569f)] [TrackClipType(typeof(SpineAnimationStateClip))] [TrackBindingType(typeof(SkeletonAnimation))] +#if UNITY_EDITOR + [DisplayName("Spine/SkeletonAnimation Track")] +#endif public class SpineAnimationStateTrack : TrackAsset { public int trackIndex = 0; diff --git a/spine-unity/Modules/com.esotericsoftware.spine.timeline/Runtime/SpineSkeletonFlip/SpineSkeletonFlipTrack.cs b/spine-unity/Modules/com.esotericsoftware.spine.timeline/Runtime/SpineSkeletonFlip/SpineSkeletonFlipTrack.cs index 6c46c0489..aa0f2fcfa 100644 --- a/spine-unity/Modules/com.esotericsoftware.spine.timeline/Runtime/SpineSkeletonFlip/SpineSkeletonFlipTrack.cs +++ b/spine-unity/Modules/com.esotericsoftware.spine.timeline/Runtime/SpineSkeletonFlip/SpineSkeletonFlipTrack.cs @@ -27,8 +27,9 @@ * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *****************************************************************************/ -using Spine.Unity; -using System.Collections.Generic; +#if UNITY_EDITOR +using System.ComponentModel; +#endif using UnityEngine; using UnityEngine.Playables; using UnityEngine.Timeline; @@ -38,6 +39,9 @@ namespace Spine.Unity.Playables { [TrackColor(0.855f, 0.8623f, 0.87f)] [TrackClipType(typeof(SpineSkeletonFlipClip))] [TrackBindingType(typeof(SpinePlayableHandleBase))] +#if UNITY_EDITOR + [DisplayName("Spine/Skeleton Flip Track")] +#endif public class SpineSkeletonFlipTrack : TrackAsset { public override Playable CreateTrackMixer (PlayableGraph graph, GameObject go, int inputCount) { return ScriptPlayable.Create(graph, inputCount); diff --git a/spine-unity/Modules/com.esotericsoftware.spine.timeline/package-no-spine-unity-dependency.json b/spine-unity/Modules/com.esotericsoftware.spine.timeline/package-no-spine-unity-dependency.json index 8079b457e..bd8874dc9 100644 --- a/spine-unity/Modules/com.esotericsoftware.spine.timeline/package-no-spine-unity-dependency.json +++ b/spine-unity/Modules/com.esotericsoftware.spine.timeline/package-no-spine-unity-dependency.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 (via the spine-unity unitypackage), version 4.0.\n(See http://esotericsoftware.com/git/spine-runtimes/spine-unity)", - "version": "4.0.8", + "version": "4.0.9", "unity": "2018.3", "author": { "name": "Esoteric Software", diff --git a/spine-unity/Modules/com.esotericsoftware.spine.timeline/package.json b/spine-unity/Modules/com.esotericsoftware.spine.timeline/package.json index bdec75d66..79a4e43c7 100644 --- a/spine-unity/Modules/com.esotericsoftware.spine.timeline/package.json +++ b/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 and spine-csharp runtimes as UPM packages (not as spine-unity unitypackage), version 4.0.\n(See http://esotericsoftware.com/git/spine-runtimes/spine-unity)", - "version": "4.0.8", + "version": "4.0.9", "unity": "2018.3", "author": { "name": "Esoteric Software",