1
NGUI 3 Support / UIInput Modifiers
« on: January 09, 2017, 09:18:22 AM »
Hi,
In order for us to achieve proper Arabic text support in Unity, we use the ArabicSupport library, which just maps the arabic characters into the proper glyphs based on their positioning.
Now, instead of handling OnChange events on all UIInput instances, it would be great to have some sort of plugin system with modifiers (something like: delegate string Process(string s)).
For now, I have simply modified UIInput.cs and changed line 1378 to:
label.text = ArabicSupport.ArabicFixer.Fix(processed);
While thinking of a generalized use case, I realized that this feature could be extremely useful to handle text input, dealing with Emoji input and whatnot.
In order for us to achieve proper Arabic text support in Unity, we use the ArabicSupport library, which just maps the arabic characters into the proper glyphs based on their positioning.
Now, instead of handling OnChange events on all UIInput instances, it would be great to have some sort of plugin system with modifiers (something like: delegate string Process(string s)).
For now, I have simply modified UIInput.cs and changed line 1378 to:
label.text = ArabicSupport.ArabicFixer.Fix(processed);
While thinking of a generalized use case, I realized that this feature could be extremely useful to handle text input, dealing with Emoji input and whatnot.