'Runtime' does not exist in the namespace 'Unity.UIElements

error CS0234: The type or namespace name ‘Runtime’ does not exist in the namespace ‘Unity.UIElements’ (are you missing an assembly reference?)

This is a weird one that I can’t seem to figure out, here are the namespaces I put in my script:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UIElements;
using Unity.UIElements.Runtime;

Am I missing something here?

I think Unity.UIElements.Runtime was the old namespace used when the runtime part was in a package, it’s not valid anymore.

UnityEngine.UIElements is all you need now.