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 :: forech unity 
Csharp :: get roaming folder c# 
Csharp :: what is public static void 
Csharp :: unity time deltatime 
Csharp :: unity c# log an error or warning 
Csharp :: write line to file c# 
Csharp :: unity object change sprite 
Csharp :: const class in c sharp 
Csharp :: mvc get base url 
Csharp :: unity reverse string 
Csharp :: yanderedev 
Csharp :: dynamic arrays in c# 
Csharp :: o(n*m) 
Csharp :: how to use the mouse scroll wheel to move the camera in unity 
Csharp :: how to put double quotes in a string c# 
Csharp :: c# lambda join two tables 
Csharp :: c# inline array initialization 
Csharp :: 2d rotation unity 
Csharp :: unity new vector3 
Csharp :: c# get list of all class fields 
Csharp :: how to get text from textbox in windows form c# 
Csharp :: ef core set identity_insert off 
Csharp :: Pass Querystring in C# httpclient 
Csharp :: join two array c# 
Csharp :: c# read last 10 lines of file 
Csharp :: c# decimal vs double 
Csharp :: new ienumerable 
Csharp :: c# radio button checked 
Csharp :: find how many digits a number has csharp 
Csharp :: multi line comment c# 
ADD CONTENT
Topic
Content
Source link
Name
7+2 =