C
C#3y ago
c_ccc

Update Text Color OnTriggerEntry

Within ZoneUpdater, I have a public colour variable that can be changed within the editor Based on this, under my other script within void Update(), I have:
zoneDisplayUI.color = gameObject.GetComponent<ZoneUpdater>().textColour;
zoneDisplayUI.text = "ZONE: " + currentZone;
zoneDisplayUI.color = gameObject.GetComponent<ZoneUpdater>().textColour;
zoneDisplayUI.text = "ZONE: " + currentZone;
Why doesnt this work, currently it completely removes my text
4 Replies
Anton
Anton3y ago
the alpha is 0 set it to 1
c_ccc
c_cccOP3y ago
c_ccc
c_cccOP3y ago
it isnt 0 i manually set it within the editor and the text quite simply disappears, i know this because of i have the format of the text right to left and the 'Zone:' pushes all the way over when i remove the colour changing line (line1) its fine it works the text appears so im completely baffled
Anton
Anton3y ago
check the alpha when you're setting it just to be sure
Want results from more Discord servers?
Add your server