Troubleshooting Grid Label Spacing
#PanicRoom Day 058 & 059
#100DaysOfCode R2D26/D27
#100DaysOfGameDev R2D23/D24
After taking a bit of a break, because honestly my brain was having trouble getting around the issues I was facing, I came back to the Grid Label code with renewed interest. I left off with some things working, but most not. I knew that the individual labels were being made, but it didn’t look like there were enough of them and there seemed to be a lot of overlapping going on.
To figure out what was going on I determined the key lines of code and started dropping Debug.Log before and after them to determine if the things happening were truly what I wanted. In many cases it was, but in others it wasn’t. This was good because it showed me where I needed to tweak things a little.
Moving in to those malfunctioning spots, I analyzed my code and found some misplaced variables, some erroneous variables, or some wrongful calculations. A few fixes later and I had every individual label placed by itself and no longer overlapping. With a little more troubleshooting I then had them all spaced out appropriately. The only thing left is to adjust final positioning.