Quantcast
Channel: Questions in topic: "ios"
Viewing all articles
Browse latest Browse all 4709

C# iOS - .active, SetActive(false)

$
0
0
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.

Viewing all articles
Browse latest Browse all 4709

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>