Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
 into 3.6
  • Loading branch information
badlogic committed Nov 17, 2017
2 parents 49137a5 + 54c2090 commit 99b975f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
11 changes: 11 additions & 0 deletions spine-c/spine-c/src/spine/AnimationState.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
6 changes: 4 additions & 2 deletions spine-unity/Assets/spine-unity/Editor/SpineEditorUtilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -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) {
Expand All @@ -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) {
Expand Down

0 comments on commit 99b975f

Please sign in to comment.