Is there a difference between `resolvedStyle.width` and `layout.width`?

In VisualElement, is there a difference between resolvedStyle.width (or height) and layout.width (or height)?

I’ve tested some cases, and their values are always the same.

Unity - Scripting API: UIElements.VisualElement.resolvedStyle
Unity - Scripting API: UIElements.VisualElement.layout

They’re the same. Layout is only a convenient way to get top/left/width/height at once. If you don’t need the other values, getting resolvedStyle.width directly is more efficient

1 Like

Thank you!
I suggest clarifying this point in the document.