Search Unity

error CS0234: The type or namespace name 'EventSystems' does not exist in the namespace 'UnityEngine

Discussion in 'New Input System' started by Held0fTheWelt, May 9, 2019.

  1. Held0fTheWelt

    Held0fTheWelt

    Joined:
    Sep 29, 2015
    Posts:
    173
    Library\PackageCache\com.unity.inputsystem@0.2.8-preview\InputSystem\Plugins\OnScreen\OnScreenButton.cs(1,19): error CS0234: The type or namespace name 'EventSystems' does not exist in the namespace 'UnityEngine' (are you missing an assembly reference?)

    Now, i get a lot of these.

    How comes ?

    Switched to the 2019.2 beta 1
     
  2. Held0fTheWelt

    Held0fTheWelt

    Joined:
    Sep 29, 2015
    Posts:
    173
    Yeah.

    You can recreate with a blank 2019.2.0b1 Project, importing Input System.
    Something has changed !

    Firstly rolling back to 2019.2.0a14
     
    Last edited: May 9, 2019
  3. jonas-echterhoff

    jonas-echterhoff

    Unity Technologies

    Joined:
    Aug 18, 2005
    Posts:
    1,633
    Unity 19.2 recently moved UGUI into a package, so other packages referencing it now need to do that explicitly. Will fix this in the next input system update.
     
    tomlong74 and Held0fTheWelt like this.
  4. unity-marcus

    unity-marcus

    Joined:
    Apr 16, 2019
    Posts:
    2
    In the meantime you can change the content of Unity.InputSystem.asmdef to:

    Code (JavaScript):
    1. {
    2.     "name": "Unity.InputSystem",
    3.     "references": [      
    4.         "GUID:2bafac87e7f4b9b418d9448d219b01ab"
    5.     ],
    6.     "optionalUnityReferences": [],
    7.     "includePlatforms": [],
    8.     "excludePlatforms": [],
    9.     "allowUnsafeCode": true
    10. }
     
  5. racsoknight

    racsoknight

    Joined:
    Jan 22, 2018
    Posts:
    1
    There is documentation or how to do it explicitly, because all my code is broken because of this.
     
  6. pinkhair

    pinkhair

    Joined:
    Dec 17, 2010
    Posts:
    129
    You can select the .asmdef file in the package in the inspector(it will have a 'puzzle piece' icon), and inside the import settings, under 'Assembly Definition References,' add a new reference, and then choose 'Unity.ugui' from the list available.
     
  7. andersand_net

    andersand_net

    Joined:
    Aug 2, 2019
    Posts:
    1
    @pinkhair In Unity version 2019.2.0f1 everything is disabled in the inspector, so I can't choose any other reference. Also tried manually editing the file as suggested by unity-marcus above to no avail.
     
  8. pinkhair

    pinkhair

    Joined:
    Dec 17, 2010
    Posts:
    129
    Ah, well, I dunno about that; it definitely works in 2019.3.0a4.
    [COLOR=rgba(0, 0, 0, 0.87)][/COLOR]