Megadok 10 Report post Posted September 19, 2020 Buenas. GUI.skin.button.stretchHeight = true; GUI.skin.button.stretchWidth = true; if (GUI.Button(new Rect(100, 100, size, size), Image)) { } Tengo un Gui.Button con una Texture2D. Me gustaría que al cambiar el tamaño del boton(size), la imagen se ajustara al botón. He probado GUI.skin.button.stretchHeight = true; y GUI.skin.button.stretchWidth = true; pero no funciona, la imagen se queda como máximo a su tamaño original. Share this post Link to post Share on other sites
francoe1 536 Report post Posted September 19, 2020 Fíjate si en GUI.skin.button.normal existe algo reference al Size de la textura. Si no, puede dibujar la textura encima del botón GUI.DrawTexture este método tiene más opciones, entre ellas la opción de FILL que estás necesitando. Share this post Link to post Share on other sites
Megadok 10 Report post Posted September 19, 2020 10 minutes ago, francoe1 said: Fíjate si en GUI.skin.button.normal existe algo reference al Size de la textura. Si no, puede dibujar la textura encima del botón GUI.DrawTexture este método tiene más opciones, entre ellas la opción de FILL que estás necesitando. Hice la segunda opción, dibujar la textura aparte y posicionar ambos con las mismas coordenadas. 1 Share this post Link to post Share on other sites