- Home /
The type or namespace 'UI' does not exist in the namespace UnityEngine. But UI is present. Need help please,The type or namespace name 'UI' does not exist in the namespace UnityEngine. Need help please
I'm using Unity 2019.3.13 and Visual Studio Community Edition. This issue does not cause build or play errors. Just red squiggly lines that are annoying tbh. Not sure what the problem is. I've tried re-importing assets and the delete library solution. They don't work for me. I've installed an older version of Unity - 2019.3.0. Still the same issue. This is not specific to the UI namespace. Even the Advertisements namespace is not found. Interestingly, the UnityEngine.UI reference is present in the Solution Explorer.
Would really appreciate help with this issue. I've browsed several forums for answers but nothing has helped. Has been driving me crazy for days
Answer by white_wolf1999 · May 11, 2020 at 01:38 PM
EDIT : Apparently, the issue is with the scripting backend and api compatibility. To fix this, go to Edit->Project Settings->Player. Scroll down till you find Configuration. Here, set the scripting backend to Mono and the api compatibility to .Net Standard 2.0
Answer by juppagames · Aug 10, 2021 at 07:07 PM
go to preferences, then external tools. selected all options above and then click Regenerate files. in visual studio a warning will appear that the project was reloaded. click yes. it will reload everything, and no errors should appear anymore.