Files
Continentis/Assets/OtherPlugins/Feel/MMTools/Accessories/MMActivation/MMDontDestroyOnLoad.cs
SoulliesOfficial 9b1b5ca93f initial
2025-10-03 00:02:43 -04:00

18 lines
401 B
C#

using UnityEngine;
namespace MoreMountains.Tools
{
/// <summary>
/// Add this component to an object and it'll persist across scenes
/// </summary>
public class MMDontDestroyOnLoad : MonoBehaviour
{
/// <summary>
/// On Awake we make sure our object will not destroy on the next scene load
/// </summary>
protected void Awake()
{
DontDestroyOnLoad(this.gameObject);
}
}
}