Saving a list with Playerprefs

So i am trying to make a small app for my dad to use as a doctor, and it includes that he can save different kinds of medicin to a list which is displayed in a dropdown menu. When he then opens the app again, the list with the recently added medicin will still be there.
I am used to saving ints and strings to playerprefs, but this is the first time i am trying to save lists.

This is the script i am working on:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class test : MonoBehaviour
{

    public List<string> medicin = new List<string>() ;
    public List<string> savedMedicin = new List<string>() ;


    public InputField input;
    public Dropdown menu;

  

    void Start()
     {
        
        
       
     


    }

    void Update()
     {

        for (int i = 0; i < savedMedicin.Count; i++)
        {
            PlayerPrefs.GetString("med" + i, savedMedicin*);*

}

}

public void AddToList()
{

medicin.Add(input.text);

for (int i = 0; i < medicin.Count; i++)
{
PlayerPrefs.SetString(“med” + i, medicin*);*
}

menu.ClearOptions();
menu.AddOptions(savedMedicin);
}
}
The script is simple: I have an input field, a dropdown menu and a button.
When i write a name in the inputfield and press the button, the name should get saved and displayed in the dropdown menu. I have tried some different ways, so the script i am showing now may not be the wisest way to go.
Well either way it does not work. I am having trouble saving the list to “med”, and retrieving it again.

Hey so i know this post is old, but i wanted to put this here anyway, incase anyone in the future needs it (someone browsing the web, idk)

You can split a string into a list relatively easily.
Yeah the script isnt that good but it works. This code inputs the playerpref Something[EndInp123]Something Else[EndInp123]Good[EndInp123]" and exports a list with the objects “Something”, “Something Else”, and “Good”. Basically, you just have to put [EndInp123] After each value.

    public string PlayerPrefString;
    public List<string> ExportList;

    void Start()
    {
        test();
        
    }

    void test()
    {
        PlayerPrefs.SetString("examplestr", "Something[EndInp123]SomethingElse[EndInp123]Good[EndInp123]");
        PlayerPrefString = PlayerPrefs.GetString("examplestr");
        StringToList(PlayerPrefString, "[EndInp123]");
        foreach (string str in ExportList)
        {
            print(str);
        }
    }
    void StringToList(string message, string seperator)
    {
        ExportList.Clear();
        string tok = "";
        foreach(char character in message)
        {
            tok = tok + character;
            if (tok.Contains(seperator))
            {
                tok = tok.Replace(seperator, "");
                ExportList.Add(tok);
                tok = "";
            }
        }
    }

Again, im completely aware that this thread is about 6 months old, but i want to post this here incase anyone comes looking in the future.

@NinjaRubberBand, I don’t think using PlayerPrefs in your example is the way you want to go. PlayerPrefs should be used for preferences, not general data storage. The problem is your list can grow and grow.

Check out this tutorial, among many others you can find, that explains different ways of saving data: