Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

c# unity detect any keyboard input but not mouse input

// 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 :: dialog box with form flutter 
Csharp :: solidity get address of contract 
Csharp :: c# string to byte[] 
Csharp :: c# ftp file download 
Csharp :: log to console c# unity 
Csharp :: get all child gameObject of gameObject C# 
Csharp :: escape double quotes c# 
Csharp :: c# list with 0 initialize 
Csharp :: c# entity framework group by 
Csharp :: get last 4 character c# 
Csharp :: get enum value from display name c# 
Csharp :: c# add char to string 
Csharp :: unity c# check how many of an object exists 
Csharp :: vscode not showing errors c# 
Csharp :: asp.net file detect mime type 
Csharp :: wpf c# select folder path 
Csharp :: inline creation dictionnary C# 
Csharp :: how to move object with keyboard in unity 3D 
Csharp :: joystock movement 
Csharp :: badlion 
Csharp :: unity random point in sphere 
Csharp :: check if string variable contains only letters c# 
Csharp :: c# string code ascii 
Csharp :: C# add two numbers using a method 
Csharp :: public gameobject unity 
Csharp :: c# datagridview rows clear not working 
Csharp :: The entity type has multiple properties with the [Key] attribute. 
Csharp :: timespan to integer c# 
Csharp :: c# .net core memory cache 
Csharp :: how to deserialize string array in c# 
ADD CONTENT
Topic
Content
Source link
Name
2+5 =