IDropHandler

interface in UnityEngine.EventSystems


Implements interfaces:IEventSystemHandler

Switch to Manual

Description

要实现的接口(如果您希望接收 OnDrop 回调)。


using UnityEngine;
using UnityEngine.EventSystems;

public class DropMe : MonoBehaviour, IDropHandler { public void OnDrop(PointerEventData data) { if (data.pointerDrag != null) { Debug.Log ("Dropped object was: " + data.pointerDrag); } } }

Public Functions

OnDrop在可以接受拖放的目标上由 BaseInputModule 调用。