How to Send Variables Between Scenes in Unity

Unity Game Programming For Beginners
Unity Game Programming For Beginners
52.8 هزار بار بازدید - 4 سال پیش - In this video we will
In this video we will be taking a look at how to send variables between scenes in Unity. Ultimately, sending variables between scenes isn't too different from sending variables between scripts in Unity.

Ultimately, what we want to do is make sure we have a centralized location where we can send those variables to temporarily stay while the new scene loads. Once that new scene loads, we can send variables between scenes by calling them back.

There are a few ways to accomplish sending variables between scenes. In this case, we'll be using a static string to transfer a difficulty setting. However, you can accomplish this same thing with enums or private non-static variables.

Try our game PORTAL GALAXY for Android here: https://bit.ly/PG_WCG
ZOMBIE BARREL BLAST signups here: http://bit.ly/WCG_ZBB
4 سال پیش در تاریخ 1399/08/22 منتشر شده است.
52,829 بـار بازدید شده
... بیشتر