So I found a strange bug, I haven’t been able to solve after trying around for some time.
When I added the code for changing the color of the text with the label.color = defaultColor method, as soon as it applies it breaks the text and remains invisible, only visible by a red outline that appears when selecting it. It then remains broken and I can’t get it back to have color (in Play mode or just in the Scene view). The only way I found to recover from that was deleting the whole Text (TMP) object in the Tile prefab, and creating a new one. Although when running the game the same issue happened again.
The color break just when going back to Unity after coding it, so to prevent the issue from appearing in the Editor I moved the ColorCoordinates method to only go through if the application is running. So now the issue only triggers when going into Play mode, although after exiting that mode the issue remains as described earlier.
Any ideas? Is this a known issue?
Engine version: 2021.3.1f1