How do you edit a variable in another scene? Also, how do you get the scene’s name that the script is running in. ie: script is running in level three, var sceneName = this.scene.name;
One way is by using window variables
window.VariableName = VariableValue;
this can’t be done, because of features like additive scene loading. a way of doing this is making a window variable as shown earlier and changing the value of the variable to the scene’s id by adding a script to the Root of the scene in question which changes the value of the window variable.