채팅 추가

This commit is contained in:
2026-09-01 14:40:02 +09:00
parent cab0d772b1
commit a5a1f1d9e9
50 changed files with 3843 additions and 1124 deletions

View File

@@ -0,0 +1,25 @@
using UnityEngine;
public class AppManager : MonoBehaviour,ISceneInitializable
{
public static AppManager Instance { get; private set; }
public VrmAvatar MyAvatar {get; private set;}
private void Awake()
{
if (Instance == null)
{
Instance = this; //만들어진 자신을 인스턴스로 설정
}
else
{
Destroy(gameObject); //이미 인스턴스가 있으면 자신을 파괴
}
}
public void OnSceneLoaded()
{
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 866ad11c03f2cb0448b00e63f4b25570

View File

@@ -1,6 +0,0 @@
using UnityEngine;
public class GameManager : MonoBehaviour
{
}

View File

@@ -1,2 +0,0 @@
fileFormatVersion: 2
guid: 8a04fd99999327e4b8dc1d3f13f1116e

View File

@@ -0,0 +1,48 @@
using UnityEngine;
using UnityEngine.SceneManagement;
public class SceneLoadManager : MonoBehaviour
{
public static SceneLoadManager Instance { get; private set; }
private void Awake()
{
if (Instance == null)
{
Instance = this; // 만들어진 자신을 인스턴스로 설정
}
else
{
Destroy(gameObject); // 이미 인스턴스가 있으면 자신을 파괴
}
}
private void Start()
{
SceneManager.sceneLoaded += OnSceneLoaded;
OnSceneLoaded(SceneManager.GetActiveScene(), LoadSceneMode.Single);
}
private void OnDestroy()
{
if (Instance == this)
{
SceneManager.sceneLoaded -= OnSceneLoaded;
}
}
private void OnSceneLoaded(Scene scene, LoadSceneMode mode)
{
MonoBehaviour[] allObjs = FindObjectsByType<MonoBehaviour>(FindObjectsSortMode.None);
foreach (var obj in allObjs)
{
if (obj is ISceneInitializable initializable)
{
// 씬에서 ISceneInitializable 인터페이스를 가진 오브젝트의 초기화 로직을 실행
initializable.OnSceneLoaded();
}
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 9cf0a9fe7459c3f4ba78bc2c9653c8ad