what am i doing wrong...it seems to be working but i get the error about event -> "The best match for method OnSubmit has some invalid parameter."
here is the code that i attached to Input control
using UnityEngine;
using System.Collections;
public class InputControl : MonoBehaviour {
public GameObject InputField;
void OnEnable()
{
UIEventListener.Get(InputField).onSubmit += OnSubmit;
}
void Start()
{
if(PlayerPrefs.HasKey("Player Name"))
{
InputField.GetComponent<UIInput>().label.text = PlayerPrefs.GetString("Player Name");
}
}
void OnSubmit(GameObject go)
{
if(PlayerPrefs.HasKey("Player Name"))
{
PlayerPrefs.SetString("Player Name", go.GetComponent<UIInput>().text);
PlayerControl.Name = PlayerPrefs.GetString("Player Name");
}
else
{
Debug.Log("No key");
}
Debug.Log("Name: " + PlayerPrefs.GetString("Player Name"));
}
}