Search Unity

Bug "currentSelectedGameObject" Not available in the EventSystem library!

Discussion in 'Scripting' started by noclipstudio, Nov 19, 2022.

  1. noclipstudio

    noclipstudio

    Joined:
    Mar 2, 2021
    Posts:
    73
    I'm having an annoying issue with UnityEngine.UI on Unity Version: 2020.3.19. It seems that some files were not imported correctly in my project, the problem is that I add the UnityEngine.EventSystems library; and I can't use GetComponent<EventSystem>()currentSelectedGameObject;.

    I already tried many things, like removing the Unity UI package from Package Manager and adding it again, I tried to create a new project in the same version and add my game assets, I tried to change the version directly, with "switch". But if I create an empty project I can use all EventSystems functions, I don't understand what is happening.