mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2024-11-23 12:33:02 +00:00
20 lines
256 B
C#
20 lines
256 B
C#
|
using UnityEngine;
|
|||
|
|
|||
|
namespace SanAndreasUnity.Utilities
|
|||
|
{
|
|||
|
|
|||
|
public class DontDestroyOnLoad : MonoBehaviour
|
|||
|
{
|
|||
|
|
|||
|
void Awake ()
|
|||
|
{
|
|||
|
if (null == this.transform.parent)
|
|||
|
{
|
|||
|
DontDestroyOnLoad (this.gameObject);
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
}
|