GAME DEVING AT 3 AM CHALLENGE (I ALMOST DIED)
This commit is contained in:
parent
c2a71d5188
commit
9930aba85d
3428 changed files with 186147 additions and 2298 deletions
19
Assets/Scripts/SceneSetup.cs
Normal file
19
Assets/Scripts/SceneSetup.cs
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
public class SceneSetup : MonoBehaviour
|
||||
{
|
||||
public static SceneSetup instance;
|
||||
public Scene UIScene;
|
||||
private void Awake()
|
||||
{
|
||||
if (instance != null && instance != this)
|
||||
{
|
||||
Destroy(gameObject);
|
||||
return;
|
||||
}
|
||||
instance = this;
|
||||
DontDestroyOnLoad(gameObject);
|
||||
SceneManager.MergeScenes(UIScene, SceneManager.GetActiveScene());
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue