Answer the question
In order to leave comments, you need to log in
How to change variables from another script if they are in different scenes?
I have bool variable in script1. and there is a script2 that changes the value of bool (In script1) if you click on the button. I would be able to do this if they were in the same scene, but they are in different scenes.
Answer the question
In order to leave comments, you need to log in
You can use PlayerPrefs by storing key data in one script and then accessing that data anywhere in the application.
If you need to save not just an int, float or string variable - ArrayPrefs2
Or use a static class variable
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question