글로벌 오브젝트 추가

This commit is contained in:
2026-07-30 12:46:37 +09:00
parent 073567c652
commit 2413483853
23 changed files with 425 additions and 51 deletions

View File

@@ -0,0 +1,18 @@
using UnityEngine;
public class GlobalObject : MonoBehaviour
{
private static GlobalObject _instance;
void Awake()
{
if (_instance == null)
{
_instance = this;
DontDestroyOnLoad(gameObject);
}
else
{
Destroy(gameObject);
}
}
}