20 lines
493 B
C#
20 lines
493 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class DontDestroyOnLoadGameplayController : MonoBehaviour
|
|
{
|
|
private void Awake()
|
|
{
|
|
if (GameplayController.GetInstance().DontDestroyOnLoadGameplayController)
|
|
{
|
|
DontDestroyOnLoad(this.gameObject);
|
|
GameplayController.GetInstance().DontDestroyOnLoadGameplayController = false;
|
|
}
|
|
else
|
|
{
|
|
Destroy(gameObject);
|
|
}
|
|
}
|
|
}
|