mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-11 09:38:44 +08:00
[unity] Fixed drag and drop code affecting other non-Spine drag and drop events, introduced in commit 29e0e917. See #2077.
This commit is contained in:
parent
29e0e9172b
commit
a82b24a649
@ -446,10 +446,11 @@ namespace Spine.Unity.Editor {
|
||||
|
||||
#if UNITY_2021_2_OR_NEWER
|
||||
internal static DragAndDropVisualMode HandleDragAndDrop (int dropTargetInstanceID, HierarchyDropFlags dropMode, Transform parentForDraggedObjects, bool perform) {
|
||||
if (!perform || DragAndDrop.objectReferences.Length == 0)
|
||||
return DragAndDropVisualMode.Copy;
|
||||
SkeletonDataAsset skeletonDataAsset = DragAndDrop.objectReferences[0] as SkeletonDataAsset;
|
||||
SkeletonDataAsset skeletonDataAsset = DragAndDrop.objectReferences.Length == 0 ? null :
|
||||
DragAndDrop.objectReferences[0] as SkeletonDataAsset;
|
||||
if (skeletonDataAsset == null)
|
||||
return DragAndDropVisualMode.None;
|
||||
if (!perform)
|
||||
return DragAndDropVisualMode.Copy;
|
||||
|
||||
GameObject dropTargetObject = UnityEditor.EditorUtility.InstanceIDToObject(dropTargetInstanceID) as GameObject;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user