Hello,
I'm very new to the whole Delegate concept. I don't get how to achieve this:
I have a UIInput field. When the user presses the NewLine-key, the text field is supposed to submit its contents.
So this is how I think it should work:
public UIInput input;
void Start()
{
input.onReturnKey = SubmitMessage();
}
private UIInput.OnReturnKey SubmitMessage()
{
input.Submit();
return UIInput.OnReturnKey.NewLine;
}
Needless to say, it doesn't. How is this system supposed to be used? Any help is much appreciated...