Legacy Documentation: Version 5.6 (Go to current version)
LanguageEnglish
  • C#
  • JS

Script language

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

PointerInputModule.DeselectIfSelectionChanged

protected void DeselectIfSelectionChanged(GameObject currentOverGo, EventSystems.BaseEventData pointerEvent);

Parameters

currentOverGo The GameObject the pointer is currently over.
pointerEvent Current event data.

Description

Deselect the current selected GameObject if the currently pointed-at GameObject is different.