Hi, I need to pass a variable part of this script:
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
public class nameSelection : MonoBehaviour {
public Text namePosition;
public string nomep;
public Text presentation;
Button bottone;
bool nosel=false;
public GameObject arrow;
void OnMouseDown(){
if (namePosition.text != "" && nosel==false) {
nomep = namePosition.text;
PlayerPrefs.SetString("nomePersonaggio",nomep);
presentation.text += " So, you are "+name+"? Nice name!";
presentation.text += " Let's select your first monster!";
nosel=true;
arrow.SetActive(true);
}
}
}
Her name is “nomep” and I need her in another scene. How I can pass her value?
(Sorry for my bad english)