title: Keeping variable from changing on another scene load
body: <p>I'm new to unity and i'm trying to load scenes based on items collected.
  Problem is that the counter is not counting my acquired items.
  I'm using <code>OnTriggerEnter2D()</code> to trigger the event; Below is the snippet:
  <br><br></p>
  
  <pre><code>private void OnTriggerEnter2D(Collider2D collision)
  {
      if (collision.gameObject.CompareTag("Player"))
      {
          collectionNumber += 1;
          Destroy(gameObject);
          if (collectionNumber == 1)
          {
              collision.gameObject.transform.Find("Acquired_Items").GetChild(0).gameObject.SetActive(true); 
              qiCollector.gameObject.transform.GetChild(0).gameObject.SetActive(true);
          }
          else if (collectionNumber == 2)
          {
              collision.gameObject.transform.Find("Acquired_Items").GetChild(1).gameObject.SetActive(true);
              qiCollector.gameObject.transform.GetChild(1).gameObject.SetActive(true);
          }
          else if (collectionNumber == 3)
          {
              collision.gameObject.transform.Find("Acquired_Items").GetChild(2).gameObject.SetActive(true);
              qiCollector.gameObject.transform.GetChild(2).gameObject.SetActive(true);
          }
          else
          {
              Debug.LogWarning("All Items Collected !!");
          }
  
          cN.text = "Collection Number " + collectionNumber.ToString();
      }
  }
  </code></pre>
  
  <p>Whenever a new scene is loaded this script is loaded because it is on my quest item. And for every scene there is a quest item. So what I want to do is basically keep track of my <code>collectionNumber</code>, but it resets to <code>0</code>.
  <br><br></p>
  
  <p>Any help is much appreciated :)</p>