- Home /
GUIText only appearing in Unity Simlutor, but not actual iPad..why?
I am building a project where a GUIText object displays based on Proximity. It works fine when I run it using UnityRemote in the Simulator / Game view, but not on the device itself (everything else is running fine).
As a reference, here is my code, which is attached to a GameObject. Only the default font (Arial) is being used.
var locationText : GUIText;
function Update() {
var areas = GameObject.FindGameObjectsWithTag ("proximity");
var distanceToPlayer = Vector3.Distance(mainCharacter.transform.position, specificArea.transform.position);
if (distanceToPlayer < proximityDistance)
{
areaName = specificArea.name;
print("here we are at:" + areaName);
locationText.text = areaName;
break;
} else {
areaName = "";
}
if (areaName == "")
{
locationText.text = areaName;
}
}
$$anonymous$$aybe the text is on a position of the screen that is viable in the editor but out of the iPad Screen. Be sure use the resolution profile in the unity simulator for iPad Wide (1024x768). (i often failed with this)