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
  4. Dismiss Notice

IME own candidate window, strange behaviour

Discussion in 'Editor & General Support' started by Daegit, Aug 6, 2020.

  1. Daegit

    Daegit

    Joined:
    Nov 20, 2015
    Posts:
    32
    Hello,

    currently im using the windows IME api in c# to receive the candidate list and render it with unity ui, which works grea.
    But if I want to select a candidate from the UI through clicking the mode from chinese switches to english, which is not an expected behaviour.
    See here


    Im just setting the unity window and register the delegate, so I can receive on WndProc the messages and act on certain messages.
    Code (CSharp):
    1.                
    2. hWndPtr = NativeWindow.GetForegroundWindow();
    3. newWndProc = new WndProcDelegate(WndProc);
    4. newWndProcPtr = Marshal.GetFunctionPointerForDelegate(newWndProc);
    5. oldWndProcPtr = NativeWindow.SetWindowLongPtr(hWndPtr, GWL_WNDPROC, newWndProcPtr);
    Does anyone ever had this issue ?
     
  2. Daegit

    Daegit

    Joined:
    Nov 20, 2015
    Posts:
    32
    Since there is not much information about ime and unity....imma push this thread

    I appreciate any help!
     
  3. Daegit

    Daegit

    Joined:
    Nov 20, 2015
    Posts:
    32
    It also would help if someone could tell me what unity is natively doin with IME. Even if I create a own input field(code vice) clicking while choosing a candidate disables the ime. It also would be interesting what Input.imeComposition under the hood is doing. Just some snippets of source code or the functions unity is calling would help.