Version: 2018.1

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 в цели, которая принимает drop.