- Home /
SelectionGrid texture stretching
Hello!
I have a custom made texture for the buttons which is 12x12 pixels, and it's just a basic color with a 1px black border. Now if I apply this texture to the button via skins, the button looks like I want - all buttons have 1px border (somehow..). If I apply this skin style to the SelectionGrid, it will look bad, because now the texture is like stretched. I've made a picture to represent that:
So, I have 3 questions:
1.Why SelectionGrid looks that bad when I expect it to look the same way as via gui.buttons (since selectiongrid is a set of buttons)?
2.Can I make selectiongrid look the same as buttons with the same texture?
3.How does unity know for buttons how to make a button looks good with this kind of small-sized textures?
Thanks!
Answer by ScroodgeM · Aug 16, 2012 at 08:34 AM
http://docs.unity3d.com/Documentation/Components/class-GUIStyle.html
border should be 1 on all edges to pin 1px-border of bacjground image and stretch texture only inside border.
Your answer

Follow this Question
Related Questions
Changing a button texture in Selection Grid 1 Answer
How might I go about creating a custom window similar to that of the Log window? 0 Answers
reference array item relative to selectiongrid button 0 Answers
Selectiongrid too many action calls... 1 Answer
Bold and italic and other combinations in GUI Button or Grid? 0 Answers