From fdae57bc757aed8c45b725572622c8268591688f Mon Sep 17 00:00:00 2001 From: chai <215380520@qq.com> Date: Thu, 18 May 2023 09:30:00 +0800 Subject: *misc --- WorldlineKeepers/Assets/Scripts/Utils/DontDestroySelf.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 WorldlineKeepers/Assets/Scripts/Utils/DontDestroySelf.cs (limited to 'WorldlineKeepers/Assets/Scripts/Utils/DontDestroySelf.cs') diff --git a/WorldlineKeepers/Assets/Scripts/Utils/DontDestroySelf.cs b/WorldlineKeepers/Assets/Scripts/Utils/DontDestroySelf.cs new file mode 100644 index 0000000..482a088 --- /dev/null +++ b/WorldlineKeepers/Assets/Scripts/Utils/DontDestroySelf.cs @@ -0,0 +1,14 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +[DefaultExecutionOrder(-1000)] +public class DontDestroySelf : MonoBehaviour +{ + + private void Awake() + { + DontDestroyOnLoad(this.gameObject); + } + +} -- cgit v1.1-26-g67d0