LanguageEnglish
  • C#
  • JS

Script language

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

This version of Unity is unsupported.

PointerInputModule.DeselectIfSelectionChanged

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

Parameters

currentOverGoThe GameObject the pointer is currently over.
pointerEventCurrent event data.

Description

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