unity代码设置鼠标样式

public class Main : MonoBehaviour {

    public Texture2D cursorTexture;//图片
    public CursorMode cursorMode = CursorMode.Auto;
    public Vector2 hotSpot = Vector2.zero;//以左上角为目标的偏移量

    void Start()
    {
        //设置光标
        Cursor.SetCursor(cursorTexture, hotSpot, cursorMode);
    }
}

 

posted @ 2018-04-14 16:04  三页菌  阅读(351)  评论(0编辑  收藏  举报