AddToClassList
Adds a class to the class list of the element in order to assign styles from USS. Note the class name is case-sensitive.
Read time 1 minuteLast updated 10 days ago
Definition
- Type: Method
- Namespace: UnityEngine.UIElements
- Assembly: UnityEngine.UIElementsModule
AddToClassList(string)
Adds a class to the class list of the element in order to assign styles from USS. Note the class name is case-sensitive.
public void AddToClassList(string className)
Parameters
The name of the class to add to the list.
AddToClassList(string[])
Adds multiple classes to the class list of the element in order to assign styles from USS. Note the class names are case-sensitive.
public void AddToClassList(params string[] classNames)
Parameters
The names of the classes to add to the list.