How To Tech

Here’s the original post.

Sometimes, when you’re browsing the posts on Facebook, and you find a particular article or a very funny video, you go back to watch it again and is nearly impossible to find it. Frustrating right?

Well, hopefully FB can help you with that; if you step onto something you like, and want to keep to watch it, or read it again or maybe you don’t have time and you want to keep it for later, you have to tap on the 3 dots icon on the post.

There’ll be displayed some actions, tap on the one called Save link or Save to watch later.

This action will save the link in your Saved folder .

You’ll find the folder under your favorites-bar, like marked in the screenshot below.

--

--

Here’s the original post.

The simplest way to save highscore in Unity is to use the built-in PlayerPrefs.

Usually is better to place the code in your game over method.

Before saving the score, you have to check if the key exist and then check if the new score is higher than the highscore. If the key doesn’t exist you have to create it of course.

Here below you can have an example of how to achieve this.

if(PlayerPrefs.HasKey("hiScore")
{
if(newScore > Playerprefs.GetInt("hiScore"))
{
highScore = newScore;
PlayerPrefs.SetInt("hiScore", highScore);
PlayerPrefs.Save();
}
}
else
{
if(newScore > highScore)
{
highScore = newScore;
PlayerPrefs.SetInt("hiScore", highScore);
PlayerPrefs.Save();
}
}

--

--

How To Tech

How To Tech

Quick tutorials on Photoshop, Unity 3D, Facebook, WhatsApp, Windows and some Game news