RandomGFGoStop/Assets/Scripts/NeedAsset.cs

37 lines
646 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class NeedAsset : MonoBehaviour
{
public TextAsset BGDataBaseText;
private static NeedAsset instance = null;
public static NeedAsset Instance
{
get
{
if (instance == null)
{
return null;
}
return instance;
}
}
private void Awake()
{
if (instance == null)
{
instance = this;
DontDestroyOnLoad(this.gameObject);
}
else
{
Destroy(this.gameObject);
}
}
}