Skip to main content

IsPointerOverUi

Description

It is used to determine whether ugui objects are touched. Prevent raycast ray penetration when clicking ugui objects.

Return

TypeDescription
BoolTrue:Touch ugui object,False:Not touching the UGUI object

Method

public bool IsPointerOverUi()

Example

internal static API ARMODAPI = new API(nameof(APITest));
private void OnLoad(){
if(ARMODAPI.IsPointerOverUi()){
Debug.Log("Hit Ugui GameObject");
}else{
Debug.Log("Hit GameObject");
}
}