Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

Cursor Lock and Visible in Unity

using UnityEngine;
using System.Collections;

public class CursorScript : MonoBehaviour
{
    // Use this for initialization
    void Start()
    {
        //Click right mouse button to hide cursor
        //Click ESC button to show curser
        Cursor.lockState = CursorLockMode.Locked;
    }
}
 
PREVIOUS NEXT
Tagged: #Cursor #Lock #Visible #Unity
ADD COMMENT
Topic
Name
9+7 =