Files
ichni_Creator_Studio/Assets/Dreamteck/Utilities/Singleton.cs
TRADER_FOER 19bf49289e 修修补补
Signed-off-by: TRADER_FOER <lhf190@outlook.com>
2026-07-17 21:09:34 +08:00

22 lines
431 B
C#

namespace Dreamteck
{
using System.Linq;
using UnityEngine;
public class Singleton<T> : PrivateSingleton<T> where T : Component
{
public static T instance
{
get
{
if (_instance == null)
{
_instance = Object.FindFirstObjectByType<T>();
}
return _instance;
}
}
}
}