using UnityEngine.UIElements; // ... VisualElement myElement = new VisualElement(); myElement.AddToClassList("myCustomClass"); // check if myElement has the "myCustomClass" class bool hasClass = myElement.ClassListContains("myCustomClass"); Debug.Log("myElement has myCustomClass: " + hasClass); // prints "true"In this example, we create a new VisualElement and add a custom class name to it using the AddToClassList() method. We then use the ClassListContains() method to check if the element contains the "myCustomClass" class and print the result with Debug.Log(). In this case, the result will be "true" because we added the class name to the element.