22 lines
394 B
C#
22 lines
394 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class Manager<TManager> : MonoBehaviour
|
|
where TManager : Component
|
|
{
|
|
private static TManager instance;
|
|
|
|
public static TManager Instance
|
|
{
|
|
get
|
|
{
|
|
return instance;
|
|
}
|
|
}
|
|
|
|
protected virtual void Awake()
|
|
{
|
|
instance = this as TManager;
|
|
}
|
|
} |