Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

how to detect a mouse click in unity

using UnityEngine;
using System.Collections;

		if (Input.GetMouseButtonDown(0)) {
        	//Left Mouse Button
        } else if (Input.GetMouseButtonDown(1)) {
        	//Right Mouse Button
        } if (Input.GetMouseButtonDown(2)) {
        	//Middle Mouse Button
        }
Comment

PREVIOUS NEXT
Code Example
Csharp :: how to detect mouse click in c# 
Csharp :: c# combobox prevent typing 
Csharp :: how to get last child of gameobject in unity 
Csharp :: c# get pc ip address 
Csharp :: random number generator unity 
Csharp :: unity how to convert to byte 
Csharp :: Check object is in layermask unity 
Csharp :: how to stop window from terminating c# visual studio 
Csharp :: c# copy file to directory 
Csharp :: read in multiple numbers c# 
Csharp :: c# or 
Csharp :: blazor get current url 
Csharp :: how to make something addforce in the direction of something in untiy 
Csharp :: get absolute url c# 
Csharp :: c# print to console 
Csharp :: round corners of textbox wpf 
Csharp :: unity log 
Csharp :: onafterrender blazor 
Csharp :: serilog loglevel order 
Csharp :: unity check when clicked on object 
Csharp :: c# empty IEnumerable 
Csharp :: c# reverse string 
Csharp :: mouselook script unity 
Csharp :: headless chromedriver C# 
Csharp :: There is already a virtual axis named Horizontal registered. unity 
Csharp :: unity get scene index 
Csharp :: unity open website url 
Csharp :: get all devices in game unity 
Csharp :: c# string to uri 
Csharp :: unity mesh showing Instance 
ADD CONTENT
Topic
Content
Source link
Name
5+3 =