Пример #1
0
 void Start()
 {
     keyBindScript = masterObject.GetComponent <KeyBindScript>();
     if (lockCursor)
     {
         Cursor.lockState = CursorLockMode.Locked;
         Cursor.visible   = false;
     }
 }
Пример #2
0
 private void Awake()
 {
     if (keybindControl == null)
     {
         DontDestroyOnLoad(gameObject);
         keybindControl = this;
     }
     else if (keybindControl != this)
     {
         Destroy(gameObject);
     }
 }