- Home /
C# iOS - .active, SetActive(false)
So,
I have a button, I am using to hide/show objects while the bool playerScript.vid = true.
if (playerScript.vid) {
Texture backTexture = Resources.Load("back") as Texture;
Rect position1 = ResizeGUI(new Rect(600, 400,100, 100));
GUI.DrawTexture(position1 , backTexture);
if (GUI.Button(position1 , "", new GUIStyle()))
{
prevObj.SetActive(true);
selfObj.SetActive(false);
Debug.Log("BACK PRESSED");
}
}
In Unity Editor this works fine, no problems. I can hide and show the objects.
When I come to test it on an iOS 7 device, it does not hide/show the object - however I can see "BACK PRESSED" in the console, however it does not set the selfObj active to false.
Any suggestions? I am at my wits ends.
Comment