Hi,
I don’t want to use guibuttons but guitextures to show buttons on my screen. I looked up guitextures in the manual am still confused about how to place and size them on the screen. I am particularly confused about the scale of the guitexture and the pixel insets.
A detailed explanation would be highly appreciated.
Thanks…
Try to play between 0 and 1 with the x, y, z of the position of the transform component of your GUITexture gameobject
Because your GUITexture is a GameObject with at least 2 components : Transform and GUITexture
Does it works for you ?
Do you want me to play with the position or the scale
C#
This should help, play with the options in the “Inspector” menu
Code:
using UnityEngine;
using System.Collections;
public class NewBehaviourScript : MonoBehaviour {
public GUIStyle Changing_Texture;
public float OutlinedTextureY;
public float OutlinedTextureX;
void OnGUI(){
if (GUI.Button (new Rect (Screen.width * OutlinedTextureX, Screen.height * OutlinedTextureY, Screen.width * .175f, Screen.height * .025f),"", Changing_Texture))
{print("Changed");}
}
}