Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

how to fix on Input.GetMouseButtonDown(0) conting as ui

using UnityEngine.EventSystems;

void Update()
{
	if (Input.GetMouseButtonDown(0))
    {
         // This line prevents the Code from activating UI
    	 if (EventSystem.current.IsPointerOverGameObject())
                return;
         // Put your code here       
    }
}
 
PREVIOUS NEXT
Tagged: #fix #conting #ui
ADD COMMENT
Topic
Name
1+3 =