static CompExplosiveCE() { var dummyGO = new GameObject(); UnityEngine.Object.DontDestroyOnLoad(dummyGO); _monoDummy = dummyGO.AddComponent <MonoDummy>(); }
public Timer() { _cancelled = false; _rawTime = 0; _name = $"~Timer_{GetHashCode()}"; var obj = new GameObject() { name = _name, hideFlags = HideFlags.HideInHierarchy }; _mono = obj.AddComponent <MonoDummy>(); Application.quitting += () => _quitting = true; }