Set the username with an inputfield ?

Hi guys, i’m new around unity/c#, and i’m trying to make an online leaderboard for a flappy bird like game,i followed Sebastian Lague’s Dreamlo tutorial,and from the looks of it, i need a username,and can’t quite figure it how to do it.I put an InputField in the main menu, but it doesn’t save it at all.
(No completions found for Player prefs)
Any help would be awesome. Thanks!
This is my wanna be code for that:

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

public class InputName : MonoBehaviour {

	public string userName;
	public GameObject inputField;

	public void Awake()
	{
		userName = inputField.GetComponent<InputField> ().text;

	}
}

Hi, first you need a public method that takes a string for parameter

public class InputName : MonoBehaviour
{ 
     public string userName;
 
     public void SetUserName (string text)
     {
         userName = text;
     }
 }

Then, in the editor, add an action to the OnValueChanged event of the Inputfield to point to that method.

Can’t thank you enough man !!

How to Display Text from InputField and Save User name in Unity