r/unity • u/Creepy-County8832 • 13h ago
Coding Help Seemingly logical code doesnt seem to work
This code is meant to receive 2 fonts, and all the text on the current scene, and then apply the font that isnt active to the text. I have properly assigned the font assets, but when clicking a button what happens is, the font changes to "dyslexiafont" then gives me the debug from the else statement (which is not the dyslexia font) and when clicking the button again nothing happens.
Ive ran this through multiple AI's and they all seem to just slightly edit my code by adding some validation, but that doesnt do anything and any time i explain the issue they just claim ive assinged the fonts wrong, but i have checked multiple times if the font asset is in the right place and it is.
I assume that either i cant apply font like this (but it does apply just once and completely messy)
Or im missing something. Any help is appreciated else ill just pretend it works.
