Quantcast
Channel: Questions in topic: "javascipt"
Viewing all articles
Browse latest Browse all 1875

GUI.Button works fine in editor but not showing after built (JS)

$
0
0
I drew a button in a script, it's showing in the editor just fine but when I built the game, the button could not be found. I tried scaling it till it fills up the whole screen view but still when I tap the screen, nothing happens. (Built it into android) Here's the code: GUI.color.a = 1; if(GUI.Button(Rect(Screen.width - Screen.width, Screen.height - Screen.height, Screen.width, Screen.height), "Collect")) { lastCollectionDT = System.DateTime.Now; lastCollection = lastCollectionDT.ToBinary(); PlayerPrefs.SetString("LastCollection", lastCollection.ToString()); userData.GetComponent.().AddCoins(collectionAmount, false, 0); }

Viewing all articles
Browse latest Browse all 1875

Trending Articles



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