Search
 
SCRIPT & CODE EXAMPLE
 

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       
    }
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: bytes size c# 
Csharp :: ontriggerenter 
Csharp :: cast from object to generic type c# 
Csharp :: where to write fluent api 
Csharp :: How to search values in the registry 
Csharp :: how to use double in c# 
Csharp :: vb.net center form in screen 
Csharp :: div element position in screen 
Csharp :: how to use buildcontext in initstate flutter 
Csharp :: c# get last array element 
Csharp :: group-by-in-linq 
Csharp :: c# null conditional 
Csharp :: Get unique id of Device 
Csharp :: aspx element visibility ould not find 
Csharp :: c# jagged array initialization 
Csharp :: dataGridView default error dialog handle 
Csharp :: int array to frequency dictionary c# 
Csharp :: null-conditional operators c# 
Csharp :: winform fixed size 
Csharp :: unity rigidbody freeze all rotation 
Csharp :: remove string inside curly braces C# 
Csharp :: unity deactivate scripts in list 
Csharp :: c# Sum of all the factors of a number 
Csharp :: unity easing out 
Csharp :: get file upload file size in MB c# 
Csharp :: query parameters sending to controller action asp.net core 
Csharp :: use c#9 
Csharp :: c# property attribute 
Csharp :: dataset empty check C# 
Csharp :: unity save scene at runtime 
ADD CONTENT
Topic
Content
Source link
Name
3+3 =