Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using System.Collections;
- //This will mark an object as something not to be destroyed when loading a new scene. Good for game/score managers that handle
- //game flow, and need to retain the data they have.
- public class DontDestroyOnLoad : MonoBehaviour {
- void Awake () {
- DontDestroyOnLoad( transform.gameObject );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement