Version: Unity 6.7 Alpha (6000.7)
LanguageEnglish
  • C#

StylePropertyAttribute

class in UnityEngine.UIElements

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

Binds a field or property of a component struct to a custom USS property.

Apply this attribute to a field or property of a struct that has the VisualElementComponentAttribute. The member receives the value of the custom USS property resolved on the element the component is attached to, so a style sheet can drive component data.

Properties

Property Description
name The custom USS property name, for example "--my-color".

Constructors

Constructor Description
StylePropertyAttribute Initializes a new instance of the StylePropertyAttribute class.