Setting Watch Tab Bool Messes With Game Time
Posted: Sat Mar 04, 2023 3:55 pm
Hey,
This isn't a big deal, but I thought I'd make a post about it since I couldn't find any information on this when I was trying to figure out the issue.
For context, I was debugging a screen fade controlled by a dialogue bool variable. To test this, I would change the bool variable through the "Watches" tab. The fade kept happening instantly, and I couldn't figure out why. Eventually, I decided to set the bool variable through code using "DialogueLua.SetVariable" and for some reason the fade worked correctly when doing this.
After a bunch of testing, I realized that clicking on the bool field to change its value in the watches tab was pausing my game, and after setting the bool value, the game would resume at a different time. Essentially, my fade was being skipped. This was a real head scratcher as my working code appeared like it wasn't working, and it took me a while to work out what was going on.
This is a pretty niche case, and I don't even think I would consider this a bug, but I thought I'd post this in case anyone else ever ran into the same issue (and when I run into this issue two years from now and forget what was going on haha).
Just in case this behavior is different in newer versions, I'm using version 2.2.33 and Unity 2020.3.43f1.
This isn't a big deal, but I thought I'd make a post about it since I couldn't find any information on this when I was trying to figure out the issue.
For context, I was debugging a screen fade controlled by a dialogue bool variable. To test this, I would change the bool variable through the "Watches" tab. The fade kept happening instantly, and I couldn't figure out why. Eventually, I decided to set the bool variable through code using "DialogueLua.SetVariable" and for some reason the fade worked correctly when doing this.
After a bunch of testing, I realized that clicking on the bool field to change its value in the watches tab was pausing my game, and after setting the bool value, the game would resume at a different time. Essentially, my fade was being skipped. This was a real head scratcher as my working code appeared like it wasn't working, and it took me a while to work out what was going on.
This is a pretty niche case, and I don't even think I would consider this a bug, but I thought I'd post this in case anyone else ever ran into the same issue (and when I run into this issue two years from now and forget what was going on haha).
Just in case this behavior is different in newer versions, I'm using version 2.2.33 and Unity 2020.3.43f1.