Hi,
I have a prefab with a UIInput component that is added during runtime. While the game is running after the prefab is added I can set the UIInput's On Submit function through the editor and have it work successfully.
The issue that I'm having is when attempting to bind this through code. I've successfully bound UIButton listeners during runtime through .onClick. However attempting to do so with .onSubmit for this UIInput is not working.
The example code I've found regarding "EventListener.Get(gameObject).onSubmit += myFunction" does not seem to work when used with UnityScript. This also fails to work with .onClick. I've found that I needed to remove the += in order to get it to work. I suspect this might be the reason for it failing on the UIInput. If anyone knows the correct syntax to use with UnityScript i'd appreciate it. Or if you know why I can't get the .onSubmit to work with UIInput i'd appreciate any help.
Thanks.