Version: 2017.3
public void OnDeselect (EventSystems.BaseEventData eventData);

参数

eventData 通常由 EventSystem 发送的 eventData。

描述

撤消选择并过渡到适当状态。

using UnityEngine;
using System.Collections;
using UnityEngine.UI;
using UnityEngine.EventSystems;// Required when using Event data.

public class ExampleClass : MonoBehaviour, IDeselectHandler //This Interface is required to receive OnDeselect callbacks. { public void OnDeselect(BaseEventData data) { Debug.Log("Deselected"); } }