time to bed

This commit is contained in:
2023-03-08 13:40:01 +02:00
parent 1c8876c99c
commit bcaa786e7c
7 changed files with 1362 additions and 38 deletions
+10 -1
View File
@@ -2,8 +2,17 @@ using UnityEngine;
public class DontDestroy : MonoBehaviour
{
public static DontDestroy Instance { get; private set; }
private void Awake()
{
DontDestroyOnLoad(gameObject);
if (Instance == null)
{
Instance = this;
DontDestroyOnLoad(gameObject);
}
else
Destroy(gameObject);
}
}