Created
November 25, 2015 02:59
-
-
Save kamilion/c593492abc9f0674475d to your computer and use it in GitHub Desktop.
How to DontDestroyOnLoad in unity.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
namespace WarZone { | |
public class KeepThisAround : MonoBehaviour { | |
void Start() { Object.DontDestroyOnLoad(transform.root.gameObject); } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment