替换鼠标样式
一、//鼠标样式更换为guiText//将js文件链接到guiText对象即可
function Start()
{
Screen.showCursor=false;
}
function Update()
{
var msPos=Input.mousePosition;
var imgX=msPos.x-Screen.width/2;
var imgY=msPos.y-Screen.height/2;
guiText.pixelOffset =Vector2(imgX,imgY);
}
二、
//用guiTexture代替鼠标样式
//将js链接到guiTexture对象即可
static var curRc=new Rect(0,0,20,20);
function Start()
{
Screen.showCursor=false;
}
function Update()
{
var msPos=Input.mousePosition;
curRc.x=msPos.x-Screen.width/2;
curRc.y=msPos.y-Screen.height/2;
guiTexture.pixelInset=curRc;
}
楼主是超人 好帖就是要顶 顶顶多好 真心顶 不错不错 很不错 楼主是超人 顶顶多好 难得一见的好帖