SanAndreasUnity/Assets/Scripts/Utilities/DontDestroyOnLoad.cs
2020-05-31 19:07:22 +02:00

19 lines
256 B
C#

using UnityEngine;
namespace SanAndreasUnity.Utilities
{
public class DontDestroyOnLoad : MonoBehaviour
{
void Awake ()
{
if (null == this.transform.parent)
{
DontDestroyOnLoad (this.gameObject);
}
}
}
}