Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

get key unity

if(Input.GetKey(KeyCode.Space))
{
	//do somthing
}
Comment

c# unity get key

[SerializeField] KeyCode your_key; //select a key in the inspector

void Update()
{
	if (Input.GetKey(your_key))
    {
    	print("your selected key was pressed");
	}
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: how to lock and hide the cursor unity 
Csharp :: c# convert seconds to hours minutes seconds 
Csharp :: c# post get request 
Csharp :: swagger authentication bearer .net core 
Csharp :: playerInputManager.JoinPlayer(....) 
Csharp :: c# right click event 
Csharp :: move towards target unity 
Csharp :: string to date vb 
Csharp :: difference between namespace and assembly in c# 
Csharp :: unity scenenmananger 
Csharp :: how to append a new line in a txt file c# 
Csharp :: how to get executable path in wpf 
Csharp :: unity gameobject.findobjectswith tag set active 
Csharp :: unity c# redirect to webiste 
Csharp :: sum of digits in c# 
Csharp :: unity gameobject.find not working 
Csharp :: C# socket bind to dns name 
Csharp :: unity3d quaternion add 90 degrees 
Csharp :: unity temperature to colour 
Csharp :: how to write switch statement unity 
Csharp :: system.linq.iorderedenumerable`2[system.char,system.char] çözümü 
Csharp :: gcd c# 
Csharp :: c# file exist 
Csharp :: clear array c# 
Csharp :: unity get textmesh pro component 
Csharp :: c# start process and wait for exit code 
Csharp :: button action asp net 
Csharp :: set particle system start colour + random between two 
Csharp :: list string to int c# 
Csharp :: how to stop rigidbody2d from falling in unity 
ADD CONTENT
Topic
Content
Source link
Name
2+1 =