19 lines
335 B
C#
19 lines
335 B
C#
using UnityEngine;
|
|
|
|
public class SpawnManager : MonoBehaviour
|
|
{
|
|
public static SpawnManager Instance { get; private set; }
|
|
|
|
private void Awake()
|
|
{
|
|
if (Instance == null)
|
|
{
|
|
Instance = this;
|
|
DontDestroyOnLoad(gameObject);
|
|
}
|
|
else
|
|
Destroy(gameObject);
|
|
|
|
}
|
|
}
|