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 :: enum in c# 
Csharp :: c# tuple 
Csharp :: dynamically add rows to datagridview c# 
Csharp :: c sharp 
Csharp :: finding keys in the registry 
Csharp :: c# for 
Csharp :: c# list foreach lambda multiple actions 
Csharp :: c# does value exist in list 
Csharp :: async await c# 
Csharp :: c# bootstrap checkbox 
Csharp :: combobox in datagrid wpf 
Csharp :: c# windows forms cancel event 
Csharp :: Get Mac address of Device in Xamarin 
Csharp :: how to write web service for API in c# 
Csharp :: substring in c# 
Csharp :: nunit cleanup after all tests 
Csharp :: c# window form align right bottom 
Csharp :: monogame print debug 
Csharp :: unity rigidbody freeze rotation y z 
Csharp :: link form to a button in dashbord visual c# 
Csharp :: unity unhide object 
Csharp :: invalidoperationexception c# ui thread 
Csharp :: c# .net core entity framework one to many 
Csharp :: how to get length of okobjectresult c# 
Csharp :: trhow exception if is null c# 
Csharp :: Get logged in user in ASP.Net 
Csharp :: c# temporary files 
Csharp :: mysql restore backup from multiple files 
Csharp :: commit help 
Csharp :: c# switch when 
ADD CONTENT
Topic
Content
Source link
Name
8+1 =