Search Unity

The type or namespace name 'IMECompositionMode' could not be found

Discussion in 'Scripting' started by Zentify, Aug 16, 2019.

  1. Zentify

    Zentify

    Joined:
    Jul 27, 2019
    Posts:
    13
    I was trying to build in WebGL and then it said this was wrong

    C:\Program Files\Unity\Hub\Editor\2019.2.0f1\Editor\Data\Resources\PackageManager\BuiltInPackages\com.unity.ugui\Runtime\EventSystem\InputModules\BaseInput.cs(19,24): error CS0246: The type or namespace name 'IMECompositionMode' could not be found (are you missing a using directive or an assembly reference?)


    Code (csharp):
    1.  
    2. namespace UnityEngine.EventSystems
    3. {
    4.     /// <summary>
    5.     /// Interface to the Input system used by the BaseInputModule. With this it is possible to bypass the Input system with your own but still use the same InputModule. For example this can be used to feed fake input into the UI or interface with a different input system.
    6.     /// </summary>
    7.     public class BaseInput : UIBehaviour
    8.     {
    9.         /// <summary>
    10.         /// Interface to Input.compositionString. Can be overridden to provide custom input instead of using the Input class.
    11.         /// </summary>
    12.         public virtual string compositionString
    13.         {
    14.             get { return Input.compositionString; }
    15.         }
    16.         /// <summary>
    17.         /// Interface to Input.imeCompositionMode. Can be overridden to provide custom input instead of using the Input class.
    18.         /// </summary>
    19.         public virtual IMECompositionMode imeCompositionMode
    20.         {
    21.             get { return Input.imeCompositionMode; }
    22.             set { Input.imeCompositionMode = value; }
    23.         }
    24.         /// <summary>
    25.         /// Interface to Input.compositionCursorPos. Can be overridden to provide custom input instead of using the Input class.
    26.         /// </summary>
    27.         public virtual Vector2 compositionCursorPos
    28.         {
    29.             get { return Input.compositionCursorPos; }
    30.             set { Input.compositionCursorPos = value; }
    31.         }
    32.         /// <summary>
    33.         /// Interface to Input.mousePresent. Can be overridden to provide custom input instead of using the Input class.
    34.         /// </summary>
    35.         public virtual bool mousePresent
    36.         {
    37.             get { return Input.mousePresent; }
    38.         }
    39.         /// <summary>
    40.         /// Interface to Input.GetMouseButtonDown. Can be overridden to provide custom input instead of using the Input class.
    41.         /// </summary>
    42.         /// <param name="button"></param>
    43.         /// <returns></returns>
    44.         public virtual bool GetMouseButtonDown(int button)
    45.         {
    46.             return Input.GetMouseButtonDown(button);
    47.         }
    48.         /// <summary>
    49.         /// Interface to Input.GetMouseButtonUp. Can be overridden to provide custom input instead of using the Input class.
    50.         /// </summary>
    51.         public virtual bool GetMouseButtonUp(int button)
    52.         {
    53.             return Input.GetMouseButtonUp(button);
    54.         }
    55.         /// <summary>
    56.         /// Interface to Input.GetMouseButton. Can be overridden to provide custom input instead of using the Input class.
    57.         /// </summary>
    58.         public virtual bool GetMouseButton(int button)
    59.         {
    60.             return Input.GetMouseButton(button);
    61.         }
    62.         /// <summary>
    63.         /// Interface to Input.mousePosition. Can be overridden to provide custom input instead of using the Input class.
    64.         /// </summary>
    65.         public virtual Vector2 mousePosition
    66.         {
    67.             get { return Input.mousePosition; }
    68.         }
    69.         /// <summary>
    70.         /// Interface to Input.mouseScrollDelta. Can be overridden to provide custom input instead of using the Input class.
    71.         /// </summary>
    72.         public virtual Vector2 mouseScrollDelta
    73.         {
    74.             get { return Input.mouseScrollDelta; }
    75.         }
    76.         /// <summary>
    77.         /// Interface to Input.touchSupported. Can be overridden to provide custom input instead of using the Input class.
    78.         /// </summary>
    79.         public virtual bool touchSupported
    80.         {
    81.             get { return Input.touchSupported; }
    82.         }
    83.         /// <summary>
    84.         /// Interface to Input.touchCount. Can be overridden to provide custom input instead of using the Input class.
    85.         /// </summary>
    86.         public virtual int touchCount
    87.         {
    88.             get { return Input.touchCount; }
    89.         }
    90.         /// <summary>
    91.         /// Interface to Input.GetTouch. Can be overridden to provide custom input instead of using the Input class.
    92.         /// </summary>
    93.         /// <param name="index">Touch index to get</param>
    94.         public virtual Touch GetTouch(int index)
    95.         {
    96.             return Input.GetTouch(index);
    97.         }
    98.         /// <summary>
    99.         /// Interface to Input.GetAxisRaw. Can be overridden to provide custom input instead of using the Input class.
    100.         /// </summary>
    101.         /// <param name="axisName">Axis name to check</param>
    102.         public virtual float GetAxisRaw(string axisName)
    103.         {
    104.             return Input.GetAxisRaw(axisName);
    105.         }
    106.         /// <summary>
    107.         /// Interface to Input.GetButtonDown. Can be overridden to provide custom input instead of using the Input class.
    108.         /// </summary>
    109.         /// <param name="buttonName">Button name to get</param>
    110.         public virtual bool GetButtonDown(string buttonName)
    111.         {
    112.             return Input.GetButtonDown(buttonName);
    113.         }
    114.     }
    115. }
    116.  
     
    mosesamanda04 likes this.
  2. ReillyJ

    ReillyJ

    Joined:
    Apr 2, 2020
    Posts:
    1
    did you fix it, if so tell me what you did
     
  3. Albebrando

    Albebrando

    Joined:
    Apr 3, 2015
    Posts:
    1
    I'm having the same issue, just opening a new project and changing the build to WebGL. I receive these three errors alltogether:
    1. 2019.2.0f1\Editor\Data\Resources\PackageManager\BuiltInPackages\com.unity.ugui\Runtime\EventSystem\InputModules\BaseInput.cs(19,24): error CS0246: The type or namespace name 'IMECompositionMode' could not be found (are you missing a using directive or an assembly reference?)
    2. ..Editor\2019.2.0f1\Editor\Data\Resources\PackageManager\BuiltInPackages\com.unity.ugui\Runtime\EventSystem\InputModules\BaseInput.cs(104,24): error CS0246: The type or namespace name 'Touch' could not be found (are you missing a using directive or an assembly reference?)
    3. 2019.2.0f1\Editor\Data\Resources\PackageManager\BuiltInPackages\com.unity.ugui\Runtime\EventSystem\InputModules\PointerInputModule.cs(70,61): error CS0246: The type or namespace name 'Touch' could not be found (are you missing a using directive or an assembly reference?)
    Do anyone know of a solution to this?

    Edit: this worked for me:

    https://forum.unity.com/threads/i-have-a-problem-getting-start-in-webgl.736436/
    There was a compatibility issue between the version of Unity I was using (one of the most recent) and the available WebGL module I had (a couple versions before, due to another project). If it's the same error you need to download the correct WebGL file or downgrade your project, that should fix it
     
    Last edited: Jul 25, 2020