Advertisement
shadowx320

GameManager.cs

Aug 23rd, 2018
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4.  
  5. public class GameManager : MonoBehaviour {
  6.  
  7. private void Awake(){
  8. Cursor.visible = false; //set the cursor visible to false on awake
  9. Cursor.lockState = CursorLockMode.Locked; //and lock the cursor on awake also
  10. }
  11.  
  12. // Use this for initialization
  13. void Start () {
  14. DontDestroyOnLoad(this); //don't destroy this gameobject when loading a new scene
  15. }
  16.  
  17. // Update is called once per frame
  18. void Update () {
  19.  
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement