Quantcast
Channel: Answers for "scene to scene variables"
Browsing latest articles
Browse All 8 View Live

Answer by Eric5h5

Use DontDestroyOnLoad in the script for the object that contains the variables you want to retain from one scene to another. Also see here about creating singletons.

View Article


Answer by TinyUtopia

PlayerPrefs Class is also very helpful if you want to save any of those variables for use in multiple game sessions.Full details are here:...

View Article


Answer by marinl

You can create an object in first scene, attach a sript to it and sen value of variable in this script. For example if you want to send user login script attachet to game object that will survife after...

View Article

Answer by blenderblender

//first script using UnityEngine; using System.Collections; public class First : MonoBehaviour { public int test=false; } //second script using UnityEngine; using System.Collections; public class...

View Article
Browsing latest articles
Browse All 8 View Live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>