Hey everyone!
I’m having a problem with hiding the cursor and locking it in the middle of the screen. It works at first but when I press esc it comes out of it and won’t go back in.
Here’s the code I am using to try and make this work :
void Update()
{
//Cursor Lock/Unlock//////////////////////////////////////////////////////////////////////////
if (Input.GetKeyDown(KeyCode.Escape) && cursorUnlocked == false)
{
cursorUnlocked = true;
Screen.showCursor = true;
Screen.lockCursor = false;
}
if (Input.GetKeyDown(KeyCode.Escape) && cursorUnlocked == true)
{
cursorUnlocked = false;
Screen.showCursor = false;
Screen.lockCursor = true;
}
/////////////////////////////////////////////////////////////////////////////////////////////
}
Thanks for your help guys!
But I still don't know how to get informations from that file I made in Save() function [line 47 on my first post] using Resources folder :( Or maybe how to move files in Start() function from resource folder to persistent data path? Then I can use File.Open without any problems.
– Kamil_Reich