Legacy Documentation: Version 2017.2 (Go to current version)
LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

Cursor.visible

public static bool visible;

Description

Determines whether the hardware pointer is visible or not.

Set this to true to reveal the cursor. Set it to false to hide the cursor. Note that in CursorLockMode.Locked mode, the cursor is invisible regardless of the value of this property.

using UnityEngine;
using System.Collections;

public class CursorScript : MonoBehaviour { // Use this for initialization void Start() { //Set Cursor to not be visible Cursor.visible = false; } }

Did you find this page useful? Please give it a rating: