From fe26844e3e4f24e58d161517d149ee7235e366ef Mon Sep 17 00:00:00 2001 From: badlogic Date: Mon, 13 Nov 2017 14:06:11 +0100 Subject: [PATCH 1/2] [ue4] Forgot to commit new queue control functions. Closes #1038 --- spine-c/spine-c/src/spine/AnimationState.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/spine-c/spine-c/src/spine/AnimationState.c b/spine-c/spine-c/src/spine/AnimationState.c index 6e489bdf7..540c0c281 100644 --- a/spine-c/spine-c/src/spine/AnimationState.c +++ b/spine-c/spine-c/src/spine/AnimationState.c @@ -180,6 +180,17 @@ void _spEventQueue_drain (_spEventQueue* self) { self->drainDisabled = 0; } +// These two functions are needed in the UE4 runtime, see #1037 +void _spAnimationState_enableQueue(spAnimationState* self) { + _spAnimationState* internal = SUB_CAST(_spAnimationState, self); + internal->queue->drainDisabled = 0; +} + +void _spAnimationState_disableQueue(spAnimationState* self) { + _spAnimationState* internal = SUB_CAST(_spAnimationState, self); + internal->queue->drainDisabled = 1; +} + void _spAnimationState_disposeTrackEntry (spTrackEntry* entry) { spIntArray_dispose(entry->timelineData); spTrackEntryArray_dispose(entry->timelineDipMix); From 54c20904fda6d352277ac703ddb7c81d275eaaa6 Mon Sep 17 00:00:00 2001 From: John Date: Tue, 14 Nov 2017 04:37:56 +0800 Subject: [PATCH 2/2] [unity] Fix editor Drag-and-Drop tooltip. --- .../Assets/spine-unity/Editor/SpineEditorUtilities.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/spine-unity/Assets/spine-unity/Editor/SpineEditorUtilities.cs b/spine-unity/Assets/spine-unity/Editor/SpineEditorUtilities.cs index 5c58ff055..b703b5f24 100644 --- a/spine-unity/Assets/spine-unity/Editor/SpineEditorUtilities.cs +++ b/spine-unity/Assets/spine-unity/Editor/SpineEditorUtilities.cs @@ -80,6 +80,7 @@ public static class Icons { public static Texture2D skeletonUtility; public static Texture2D hingeChain; public static Texture2D subMeshRenderer; + public static Texture2D skeletonDataAssetIcon; public static Texture2D info; @@ -126,6 +127,7 @@ public static void Initialize () { hingeChain = LoadIcon("icon-hingeChain.png"); subMeshRenderer = LoadIcon("icon-subMeshRenderer.png"); + skeletonDataAssetIcon = LoadIcon("SkeletonDataAsset Icon.png"); info = EditorGUIUtility.FindTexture("console.infoicon.sml"); unity = EditorGUIUtility.FindTexture("SceneAsset Icon"); @@ -342,7 +344,7 @@ public class SkeletonComponentSpawnType { static void SceneViewDragAndDrop (SceneView sceneview) { var current = UnityEngine.Event.current; var references = DragAndDrop.objectReferences; - if (current.type == EventType.Repaint || current.type == EventType.Layout) return; + if (current.type == EventType.Layout) return; // Allow drag and drop of one SkeletonDataAsset. if (references.Length == 1) { @@ -360,7 +362,7 @@ static void SceneViewDragAndDrop (SceneView sceneview) { } else { DragAndDrop.visualMode = DragAndDropVisualMode.Copy; Handles.BeginGUI(); - GUI.Label(new Rect(mousePos + new Vector2(20f, 20f), new Vector2(400f, 20f)), new GUIContent(string.Format("Create Spine GameObject ({0})", skeletonDataAsset.skeletonJSON.name), SpineEditorUtilities.Icons.spine)); + GUI.Label(new Rect(mousePos + new Vector2(20f, 20f), new Vector2(400f, 20f)), new GUIContent(string.Format("Create Spine GameObject ({0})", skeletonDataAsset.skeletonJSON.name), SpineEditorUtilities.Icons.skeletonDataAssetIcon)); Handles.EndGUI(); if (current.type == EventType.DragPerform) {