Hello!
There was a problem translating text and other information into other scenes, for example:
- I’m from the scene Menu, for example, I want to copy the text Hello World into the Mine scene, how can this be done?
Thanks to everyone in advance …
Hello!
There was a problem translating text and other information into other scenes, for example:
Thanks to everyone in advance …
I don’t really understand what you mean by copying the text into the other scene but maybe this will help: You could attach a script to your canvas that contains the DontDestroyOnLoad(gameObject) method. Then your canvas, containing the text, will not be destroyed when changing from the menu scene to the next scene. If you mean something else please give more info ![]()
Hello. You almost understood my problem. I want, for example, the text “Hello World” from a Mine scene, after a person clicks on the button for switching to another scene, there this text is displayed in the text box.
That is, moving text from scene to scene.
One more example. There is Money and some number. I want that when Money is changed, this number will change in all the scenes where it is.
Whenever you change a specific value - save it with a key to file using Json / Binary serialization or simply using PlayerPrefs.
When you enter any new level - load each value with the same key you saved it with.
PlayerPrefs is your friend