Load Scene with password

Hi, i need a way to write the password in Input Field and change scene…
Thanks

Make a Input field and a button and a Script
in the button select onClick a GO which has the script attached then select the onclick Method I wrote also make a Reference to the Inputfield so it can be found f.e. make a “public InputField inputField;” and drag it in the editor;

Here the Script:

    void OnLoadButtonClicked()
    {
        string input = inputField.text;
        if (input.Equals("password"))
            SceneManager.LoadScene("OtherSceneName");
        else
            Debug.Log("Wrong Password");
    }

Didnt tested it but should work I think

@StonedLover can you send me a completed script too? It realy helps me.),@StonedLover it writes: Unexpected symbol “private” can you help me?

Hi @StonedLover and @MaksNeon can you send me the completed script. I have problems with the code:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;

public class prueba_pass: MonoBehaviour
{
    public void PassEnter(string input)
    {
        string input = inputField.text;
         if (input.Equals("benito"))
             SceneManager.LoadScene("realidad_aumentada");
         else
             Debug.Log("Wrong Password");
    }
}

Thanks a lot!