using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class MouseClick : MonoBehaviour {
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
if (Input.GetMouseButtonDown(0)) {
Debug.Log("点击了鼠标左键");
}
if (Input.GetMouseButtonDown(1)) {
Debug.Log("点击了鼠标右键");
}
if (Input.GetMouseButtonDown(2)) {
Debug.Log("点击了鼠标中键");
}
}
}
Unity3D学习记录——鼠标按键获取
最新推荐文章于 2024-03-28 10:19:42 发布