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.

BaseInputModule.IsPointerOverGameObject

public bool IsPointerOverGameObject(int pointerId);

Parameters

pointerIdPointer ID.

Description

Is the pointer with the given ID over an EventSystem object?

If the module is pointer based, you can override it to return true if the pointer is over an EventSystem object.

See EventSystem.IsPointerOverGameObject.