Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Input.imeCompositionMode doesn't work in Unity5

Discussion in 'Editor & General Support' started by R0411, Mar 27, 2015.

  1. R0411

    R0411

    Joined:
    Mar 25, 2015
    Posts:
    2
    I can set Input.imeCompositionMode to IMECompositionMode.On or IMECompositionMode.Off to explicitly enable or disable IME composition in Unity 4.x.
    But in Unity5, This doesn't work.

    A simple test script as follows:
    Code (CSharp):
    1.     public void Update()
    2.     {
    3.         if (Input.imeCompositionMode == IMECompositionMode.Auto)
    4.         {
    5.             mode.text = "Auto";
    6.             return;
    7.         }
    8.  
    9.         if (Input.imeCompositionMode == IMECompositionMode.On)
    10.         {
    11.             mode.text = "On";
    12.             return;
    13.         }
    14.  
    15.         if (Input.imeCompositionMode == IMECompositionMode.Off)
    16.         {
    17.             mode.text = "Off";
    18.             return;
    19.         }
    20.     }
    21.  
    22.     public void OnGUI()
    23.     {
    24.         Event e = Event.current;
    25.         if (e.isKey && e.keyCode != KeyCode.None)
    26.         {
    27.             Debug.LogError("Detected key code: " + e.keyCode + ";" + e.type + ";" + e.character);
    28.         }
    29.     }
    In Unity5 with Input.imeCompositionMode setting to IMECompositionMode.Off, the IME inputting is still enabled, and I also tried IMECompositionMode.Auto, that doesn't work,either
    Unity5_Off.png

    While In Unity4.5, Input.imeCompositionMode works just fine.
    Unity4_Off.png

    Is there any solution to this problem? or it is a Unity 5 bug?
    PS(UI in the Demo is NGUI 3.8)
     
    Code_Guest0001 likes this.
  2. allanolivei

    allanolivei

    Joined:
    Oct 31, 2012
    Posts:
    6
    I have the same problem, IMECompositionMode.Off doesn't work.
     
  3. marsonmao

    marsonmao

    Joined:
    Jan 20, 2015
    Posts:
    6
    Any solutions found yet?