In a scene I get the data entered by the user, once you enter the data with a button changes the scene but the problem is that I do not know how to pass that value to the other scene. the method where I get the value of the data and change the scene
public void closePanel()
{
int numeroid = int.Parse(inputFielEditar.text);
new InicioSesion().cambiarScene(3);
//gameObject.
//panelEditar.SetActive(false);
}
and in the other script that starts some data from the scene try the following to receive the data
public RegistroEjercicio(int numEjercicio)
{
this.numEjercicio = numEjercicio;
}
// Use this for initialization
void Start () {
if (numEjercicio !=0)
{
llenar();
}
}
The problem is that I did not find out how to fill that constructor and start it when changing the scene