- Home /
GUITexture Position
Hello, I have a GUITexture that shows a jpeg file in iOS, I can't set the GUITexture to the bottom of the screen, I already tried to children the GUITexture to a empty object still can not set in the correct position, If I use the UNITY REMOTE 4 shows different from RUN in the device via Xcode. I am trying to position via Inspector like the picture below. What I did not try is to attach the GUITexture to an object I do not know how to do it. Any tips to help me?
This is the main model position, it is in the center of the screen in both Unity Remote and the iOS device.

This is the infoPanel that show full bottom picture in the bottom of the IOS but very small picture in the device itself.

Answer by JadeW · Sep 04, 2014 at 06:35 PM
Hi, it is hard to get the correct positions working with GUI, try this script it is from Mr.Unity Tutorials. Note this Script show two Boxes and works in all screens. Hope it helps
using UnityEngine;
using System.Collections;
public class resizegui : MonoBehaviour
{
public float difference = 1;
void FixedUpdate()
{
difference = (Screen.width / 12.8f) / 100;
}
void OnGUI()
{
GUI.Box(new Rect(20 * difference, 20 * difference, 200 * difference, 200 * difference), "");
GUI.Button(new Rect(20 * difference, 230 * difference, 200 * difference, 200 * difference), "");
}
}
I was looking for this long time, It worked for me, thank you JadeW
Your answer
Follow this Question
Related Questions
A node in a childnode? 1 Answer
Replacing letters with images? 1 Answer
Scale GUITexture as big as In-Game GameObject 0 Answers
How to Show / Hide a GUI Texture 1 Answer