Version: 2019.2

IDropHandler

interface in UnityEngine.EventSystems


Implements interfaces:IEventSystemHandler

Switch to Manual

Description

Интерфейс, реализующий получение коллбеков OnDrop.

using UnityEngine;
using UnityEngine.EventSystems;

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

Public Functions

OnDropВызывается из BaseInputModule в цели, которая принимает drop.