Search
 
SCRIPT & CODE EXAMPLE
 

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;
    }
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: c# change label forecolor code 
Csharp :: unity scene load 
Csharp :: hello world in c# 
Csharp :: unity rotation between 2 points 
Csharp :: unity check collider layer 
Csharp :: how to get a list of processes c# 
Csharp :: unity check if space pressed 
Csharp :: how to set a vector 3 variable in csharp 
Csharp :: c# textboxaccept only numbers 
Csharp :: Time delay C# unity 
Csharp :: c# remove crlf from string 
Csharp :: c# Escape sequence 
Csharp :: c# check file exists 
Csharp :: unity how to set an objects postion x,y,z 
Csharp :: unity foreach dictionary 
Csharp :: Retrieve url path 
Csharp :: get application path c# 
Csharp :: c# loop datatable rows 
Csharp :: unity movetowards 
Csharp :: find closest gameobject unity 
Csharp :: unity script detect if in prefab edition mode 
Csharp :: c# mysql query 
Csharp :: if animation ends 
Csharp :: c# format decimal as currency 
Csharp :: playerInputManager.JoinPlayer(....) 
Csharp :: c# json to dictionary 
Csharp :: how to append a new line in a txt file c# 
Csharp :: c# connection string 
Csharp :: check if ienumerable is empty c# 
Csharp :: C# infinite clock coroutine loop 
ADD CONTENT
Topic
Content
Source link
Name
2+2 =