Answers for "keycode for left mouse click unity"

C#
1

keycode for left mouse click unity

using UnityEngine;public class Example : MonoBehaviour
{
    void Update()
    {
        //Detect if the left mouse button is pressed
        if (Input.GetKey(KeyCode.Mouse0))
        {
            Debug.Log("Mouse 0 ");
        }
    }
}
Posted by: Guest on May-15-2021

C# Answers by Framework

Browse Popular Code Answers by Language