Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

unity detect keyboard not mouse

// Detect any keyboard input but not mouse input
private void Update()
{
	if (Input.anyKeyDown && !(Input.GetMouseButtonDown(0) 
    	|| !Input.GetMouseButtonDown(1) || !Input.GetMouseButtonDown(2)))
	{
    	Debug.Log("No mouse pressed!");
	}
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: how to store array in c# 
Csharp :: c# itext 7 pdf add pdf 
Csharp :: how to add a queue unity 
Csharp :: .net framework get configuration value from web.config 
Csharp :: unity log error 
Csharp :: unity get all children 
Csharp :: how to set unique constraint from EF core 
Csharp :: distinct prime factors count of a number 
Csharp :: c# restclient timeout 
Csharp :: string isnullorempty vs isnullorwhitespace 
Csharp :: get client ip address c# 
Csharp :: c# get array subarray 
Csharp :: how to remove vowels from a sttring using regex c# 
Csharp :: convert string to list int c# 
Csharp :: c# unity 
Csharp :: .net get system environment variable 
Csharp :: console.writeline in c# 
Csharp :: see if two string arrays are equal c# 
Csharp :: how to check datagridview cell is null or empty 
Csharp :: How to take input on float in c# 
Csharp :: unity string lowercase 
Csharp :: getmousebuttondown unity 
Csharp :: how to work with ascii in c# 
Csharp :: array join c# 
Csharp :: get current time c# 
Csharp :: c# edit element in list 
Csharp :: how to remove white spaces from string in c# 
Csharp :: or c# 
Csharp :: C# using variables inside strings 
Csharp :: .net core partial view with model 
ADD CONTENT
Topic
Content
Source link
Name
2+9 =