How to use PlayerPrefs to stop an item from reappearing when you return to the level

I’m very new to the concept of PlayerPrefs, as the code below probably demonstrates. I’ve looked around for an explanation to using PlayerPrefs to stop an item from reappearing, but I’m still stumped.

I’ll make the scenario very simple: I have two levels in my game, Level 1 and Level 2. There’s a pickup in Level 1 (which I’ll call Pickup1), and I don’t want this pickup to reappear if I pick it up in Level 1, go to Level 2, and then come back to Level 1. (I also don’t want it to come back when I quit the game and restart, which is why I’m using PlayerPrefs and not DontDestroyOnLoad). How can I use PlayerPrefs to stop the pickup from reappearing?

Here is the code that I tried, but it’s not working. I have this code set to my character in both Level 1 and Level 2. My guess is that there are at least 20 things wrong with my strategy. Thanks so much for your help–maybe one day I won’t be a noob!

using UnityEngine;
using System.Collections;

public class Playerprefscript : MonoBehaviour {

public GameObject Pickup1;

void Start()
{
	PlayerPrefs.SetInt ("Pickup1", 0); 
	

	}

void OnTriggerEnter(Collider other)
{
	if (other.gameObject.CompareTag("Pickup1")) 
		{
		other.gameObject.SetActive (false);
		PlayerPrefs.SetInt("Pickup1", 1);
}
			}

void Update()
{
	if (PlayerPrefs.GetInt ("Pickup1") == 1) {
		Destroy (Pickup1);
	}

}

}

I think that is due to set player prefs value to 0. So comment out PlayerPrefs.SetInt (“Pickup1”, 0); in Start().

And use if (PlayerPrefs.GetInt (“Pickup1”,0) == 1) in Update() or everywhere else you used before.

That sounds promising–would the alternative save method still work when you quit and restart the game, or does it only save the data while the game is running?