using UnityEngine;
using System.Collections;
///
/// 鼠标更换
///
public class MosCursor : MonoBehaviour {
///
/// 要更换的图片
///
public Texture mouseImage;
///
/// 记录鼠标的位置
///
private Vector3 msPos;
// Use this for initialization
void Start() {
//把鼠标隐藏掉
Cursor.visible = false;
}
// Update is called once per frame
void Update() {
}
void OnGUI()
{
msPos = Input.mousePosition;
GUI.DrawTexture(new Rect (msPos.x,Screen.height-msPos.y,25,25),mouseImage);
}
}
unity之鼠标的隐藏和更换图片
最新推荐文章于 2024-05-21 15:41:54 发布