I want to control the width of a GUILayout Texture2D.
GUILayout.Box(fuelBarTex, fuelBarStyle);
I tried to do this by GUILayout.Width;
GUILayout.Box(fuelBarTex, fuelBarStyle, GUILayout.Width(100));
But this also scales the hight even when i give a absolute hight with it.
GUILayout.Box(fuelBarTex, fuelBarStyle, GUILayout.Width(100), GUILayout.Height(100));
So maybe this can be done, but for some reason it's not.
i also tried this:
var fuelBar: GUILayout;
fuelBar = GUILayout.Box(fuelBarTex, fuelBarStyle);
fuelBar.width = 200;
that doesnt work either.
I cannot use GUI.Box because i want it to be in the top-left part of the screen, even if resized. can someone explain me what i'm doing worng?? Thanks