title: How Do I Create A List In Unity?
body: <p>When I create a list, I get this error: using the generic type system.collections.generic.list' requires 1' type argument(s)</p>
  <p>Here is my code:</p>
  <pre><code>using System.Collections;
  using System.Collections.Generic;
  using UnityEngine;
  
  
  public class DestroyPotionForever : MonoBehaviour
  {
      public static List namesOfDestroyedObjects = new List();
      // Start is called before the first frame update
      void Start()
      {
          if(namesOfDestroyedObjects.Count&gt;0){
  
              for (int i = 0; i &lt; namesOfDestroyedObjects.Count; i++) {
                  Destroy(GameObject.Find(namesOfDestroyedObjects[i]));
              }
          }
      }
      void OnTriggerEnter(){
          namesOfDestroyedObjects.Add(this.gameObject.name);
          Destroy(this.gameObject);
      }
  
      // Update is called once per frame
      void Update()
      {
          
      }
  } 
  </code></pre>