RandomGFGoStop/Assets/Scripts/NeedAsset.cs

37 lines
646 B
C#
Raw Normal View History

2025-08-27 21:08:17 +00:00
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);
}
}
}