Hi!
I got this one solved but here it is for others <3
In Unity 2020.3.19f with AR project I created a Script and after opening it I got a warning window that said something like “One or more packages were not loaded” and in the output of Visual Studio (2019) there was a message “D:/…directoryPathToProject…/UnityEditor.UI.csproj could not be leaded”.
Based on another post in the forum this should work for Visual Studio Code as well.
My solution:
In Unity go to Window > Package Manager > Visual Studio Editor / Visual Studio Code Editor
→ Here you see the available versions and your currently installed version. What I did was downgrading few versions back and I always opened the Script to see if the warning message is still there. Once it was gone I tried to go up in the version again and opening the script again. So, I slowely installed the newest version again and now it is working!
How to downgrade:
In Unity Package Manager select a version and on the right bottom corner there will be “Update to X.X.X” button.
Good luck guys!