From e61e555361940b1b3c865520d78b203df03237c5 Mon Sep 17 00:00:00 2001 From: chai Date: Sun, 23 Sep 2018 19:34:47 +0800 Subject: *update --- Box2d/Assets/Program/Test/DontDestroyOnLoad.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 Box2d/Assets/Program/Test/DontDestroyOnLoad.cs (limited to 'Box2d/Assets/Program/Test/DontDestroyOnLoad.cs') diff --git a/Box2d/Assets/Program/Test/DontDestroyOnLoad.cs b/Box2d/Assets/Program/Test/DontDestroyOnLoad.cs new file mode 100644 index 0000000..0ea2e7f --- /dev/null +++ b/Box2d/Assets/Program/Test/DontDestroyOnLoad.cs @@ -0,0 +1,13 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class DontDestroyOnLoad : MonoBehaviour +{ + + private void Awake() + { + DontDestroyOnLoad(gameObject); + } + +} -- cgit v1.1-26-g67d0