I have been trying to make a sleep function in C# that will allow the game to be briefly paused when played. If it helps any, I am using Unity 3D.
I have been trying to make a sleep function in C# that will allow the game to be briefly paused when played. If it helps any, I am using Unity 3D.
Also, I have already tried using System.Threading; And then Thread.Sleep(); But it doesn't seem to do anything.
Are you sleeping on a background thread?
Sleeping a thread is rarely the best solution. I'm not saying it's not the best solution in your case, just that there's usually a better way to do it.
I've never done anything with Unity 3D but a "pause unity game" google search came up with setting Time.timeScale to 0 or call the OnPauseGame() method. Here's the page I found it on: How do I pause my game? - Unity Answers
If you understand what you're doing, you're not learning anything.