How to save text file with the entered text in the username's input field?

Hi everyone, i created a text file in which i will save the player data; name, age, score, etc… I save the username as entered in the input field, is there anyway to save the file with that name entered in the input field text, so when i load it i know its name easily.

Thanks for answer. I know how to save inputfield data, i ask about how to rename the text file with the player name entered in the input field? Regards.

Hi, this is my first answer so sorry if I’m wrong.
To save strings u can do this:

public string username;

void Start() { // function where you want to load

 LoadUsername();
}

void SaveUsername() { // Here we define the function to save the username

    PlayerPrefs.SetString("username", username); 
  }

void LoadUsername() { // Here we define the function to load the username

  username = PlayerPrefs.GetString("username");
}

void SaveHere() { // function where u want to save

 SaveUsername();
}