//This fires the event. It is virtual because derived classes can override it protected virtual void OnInputSubmitted(InputSubmittedEventArgs e) { if (InputSubmitted != null) { InputSubmitted(this.gameObject, e); } }
//This method loads the args object with the correct stuff public void SubmitString(string n) { InputSubmittedEventArgs args = new InputSubmittedEventArgs(); args.value = n; OnInputSubmitted(args); this.gameObject.SetActive(false); }