Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class GameManager : MonoBehaviour {
- private void Awake(){
- Cursor.visible = false; //set the cursor visible to false on awake
- Cursor.lockState = CursorLockMode.Locked; //and lock the cursor on awake also
- }
- // Use this for initialization
- void Start () {
- DontDestroyOnLoad(this); //don't destroy this gameobject when loading a new scene
- }
- // Update is called once per frame
- void Update () {
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement