
I have a node with two exported variables and the default value of "Num" is 0. I added this node to a scene.
When I change the value of "Num" to 2 in the inspector, the values of the export variables are permanently stored in the scene. My question is: Is it possible to change the value of the export variable using code?
Because currently when I change the value of the export variable "Num" to 3, when I go to another scene and return, the value of "Num" changes back to 2, which is not what I expected.
The reason I'm asking this question is because I want to use export variables to "store" the state of the trees in the map. For example, I have an export variable for the state of the trees (1 for spring, 2 for summer, 3 for fall, 4 for winter) so if the season changes, I can change the state of the trees and save the map so that I don't need to add additional logic to store the information.
Also, is it a bad idea to use export variables to store things?