As the title says, this only happens in build, works fine in editor.
I have this character, that has a script which has a bunch of public floats that i’m using as stats (attack, defence, etc). You can go to this status menu, and it’ll copy over the stats from the character to the status screen’s internal script (this works fine), where you can then allocate stat points (also works fine).
Here’s where things go wrong. I have this public void that’s called whenever you go off the status screen that copies all the internal values back to the character’s script, and writes them also to a text file which i’m using as a rudimentary save file (this works fine elsewhere), and then it disables the status screen object. that object.gameObject.SetActive(false); line is within an if statement that only becomes true at the end of the last instance of a for loop (which also runs the code for saving to the text file), and this for loop is at the end of the void.
ONLY THAT LINE RUNS!! WHY!?!?!?
I don’t get any errors or anything, but the values aren’t copied over to the character or into the text file, and I have not a single clue why.