How to set button icon size - ui document?

I am setting ui button icon but I do not see an option to set its attributes. I want the icon to take less or equal area compared to text.
The icon scales based on the button size, but I do not want the button size to set to a higher number.

You have the element Inspector to the right in UI Builder. You can set the button to a fixed Min/Max size to prevent any scaling.

Not working. I am trying setting the icon to very left or smaller to fit the text regardless of the button size. Not the scaling of the button element. I need the text in center. No alignment options making it centered.

Hello! You can target it in USS and edit the styles there, you create the selector, and then add the styles to it.

#MenuButton .unity-button__image {
}
1 Like