19 lines
462 B
C#
19 lines
462 B
C#
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());
|
|
}
|
|
}
|