How can you do a custom GUIStyle image position?

Hello, amazing person, who is willing to help!

I am trying to customise my GUI and I have hit a wall - I can’t seem to be able to position my image within a button.

(GUILayout.Button( GUIContent( text,btnTexture), GUIStyle(ImagePosition.ImageLeft), GUILayout.Width(Screen.width), GUILayout.Height(100)))

If I write ImagePosition, I can’t seem to align it to the ImageRight, only ImageAbove or ImageLeft. Is it possible to change that, so I can position text to the left and image to the right?

Thank you.

You need to make a new GUIStyle of your own and the mess with the padding and the border. It should look something like this:

GUIStyle myStyle = new GUIStyle(;
myStyle.border = ...
myStyle.padding = ...
GUILayout.Button(..., myStyle);