docs.unity3d.com
    Show / Hide Table of Contents

    Struct IMECompositionString

    A struct representing an string of characters generated by an IME for text input.

    Namespace: UnityEngine.InputSystem.LowLevel
    Syntax
    public struct IMECompositionString : IEnumerable<char>
    Remarks

    This is the internal representation of character strings in the event stream. It is exposed to user content through the OnIMECompositionChanged(IMECompositionString) method. It can easily be converted to a normal C# string using ToString(), but is exposed as the raw struct to avoid allocating memory by default.

    Constructors

    IMECompositionString(String)

    Declaration
    public IMECompositionString(string characters)
    Parameters
    Type Name Description
    String characters

    Properties

    Count

    Declaration
    public int Count { get; }
    Property Value
    Type Description
    Int32

    Item[Int32]

    Declaration
    public char this[int index] { get; }
    Parameters
    Type Name Description
    Int32 index
    Property Value
    Type Description
    Char

    Methods

    GetEnumerator()

    Declaration
    public IEnumerator<char> GetEnumerator()
    Returns
    Type Description
    IEnumerator<Char>

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    String
    In This Article
    • Constructors
      • IMECompositionString(String)
    • Properties
      • Count
      • Item[Int32]
    • Methods
      • GetEnumerator()
      • ToString()
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023