2 CS0234 errors and 1 CS0246 error

Since your November post shows you using UnityEngine.UI correctly, this is likely just your editor losing its mind.

This may help you with intellisense and possibly other Visual Studio integration problems:

Sometimes the fix is as simple as doing Assets → Open C# Project from Unity. Other times it requires more.

Other times it requires you also nuke the userprefs and .vsconfig and other crufty low-value high-hassle files that Visual Studio tends to slowly damage over time, then try the above trick.

Barring all that, move on to other ideas:

Also, try update the package inside of Unity: Window → Package Manager → Search for Visual Studio Editor → Press the Update button

Depending on flavor and version of Visual Studio, it may also have an installation step that you perform within the actual Visual Studio. This step seems finicky at best and may require multiple openings of VS before it comes up.

Update: The VSCode extension has been deprecated and abandoned:

Update: the VSCode integration is back… maybe!?

There may be a community fork available that is receiving updates.

Also, this: No suggestions in Vscode

Recently (July 2023) I worked on a Windows11 system that required a Microsoft component to be installed from within Visual Studio before it would work properly with all the OTHER software installed under Unity. I have no documentation on that process as I have only seen it once and it surprised me as well.

Otherwise, as Lurk correctly points out:

UnityEngine.UI is now a package:

To avoid using the Project Mangler UI, add it directly to your project’s Packages/manifest.json as this line:

"com.unity.ugui": "1.0.0",

Annoying possible issue circa October 2021:

ALSO… get rid of everything you don’t need.

Extra unwanted packages in new projects (collab, testing, rider and other junk):

About the fastest way I have found to make a project and avoid all this noise is to create the project, then as soon as you see the files appear, FORCE-STOP (hard-kill) Unity (with the Activity Manager or Task Manager), then go hand-edit the Packages/manifest.json file as outlined in the above post, then reopen Unity.

Sometimes the package system gets borked from all this unnecessary churn and requires the package cache to be cleared:

And finally, for future reference:

How to report your problem productively in the Unity3D forums:

http://plbm.com/?p=220

This is the bare minimum of information to report:

  • what you want
  • what you tried
  • what you expected to happen
  • what actually happened, log output, variable values, and especially any errors you see
  • links to actual Unity3D documentation you used to cross-check your work (CRITICAL!!!)

The purpose of YOU providing links is to make our job easier, while simultaneously showing us that you actually put effort into the process. If you haven’t put effort into finding the documentation, why should we bother putting effort into replying?

If you post a code snippet, ALWAYS USE CODE TAGS:

How to use code tags: Using code tags properly

  • Do not TALK about code without posting it.
  • Do NOT post unformatted code.
  • Do NOT retype code. Use copy/paste properly using code tags.
  • Do NOT post screenshots of code.
  • Do NOT post photographs of code.
  • Do NOT attach entire scripts to your post.
  • ONLY post the relevant code, and then refer to it in your discussion.