Legacy Documentation: Version 5.1
LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

Selectable.OnDeselect

Switch to Manual
public function OnDeselect(eventData: EventSystems.BaseEventData): void;

Parameters

eventData The eventData usually sent by the EventSystem.

Description

Unset selection and transition to appropriate state.

#pragma strict
// Required when using Event data.
public function OnDeselect(data) {
	Debug.Log("Deselected");
}