InputSystem
InputSystem copied to clipboard
Using variable size IME events
Description
Continuation of work from #1120
Unity historically was using fixed size IME event type with 64 characters, which is not sufficient in some cases, like complex emojis. Some years ago a new IME event type was added that instead contains a variable size array of characters that solves the problem above.
Native code reports both events at a same time on all platforms where IME is implemented.
Changes made
- Adding new event type.
- Using it for IME composition events.
- Modifying
IMECompositionStringto be a small string optimization container, where below 64 characters it will not allocate, but above will do a managed allocation. - Slightly breaking the API as
IMECompositionStringcannot be used in the old event anymore due to adding a new field there.
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
0 out of 2 committers have signed the CLA.
:x: Dmytro Ivanov
:x: StayTalm
Dmytro Ivanov seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.