Skill Tree Activated

The quest to become an indie game developer

#100DaysOfCode#100DaysOfGameDevC#Illogical BaconPanic RoomScript-writingUnityVideosVisual Studio

Label Toggling

#PanicRoom Day 066

#100DaysOfCode R2D32
#100DaysOfGameDev R2D31

adding the ToggleVisibility script to the label prefabs

It took me a minute to figure out how to approach toggling the Floor Grid Labels on and off, but then I remembered I wrote the ToggleVisibile script for just that. To get it to work it was merely a matter of having all the generated label objects tagged with what grid they are associated with, floorgrid in this case, and the script would detect them and toggle their respective renderers when the hotkey assigned to them is pressed. A quick test and it all seemed to be working.

code to tag the generated labels so they will toggle on/off

Leave a Reply

Your email address will not be published. Required fields are marked *