기본 이동, 네트워크, 카메라 설정 + 기본 애셋 추가

This commit is contained in:
2026-01-24 02:01:02 +09:00
parent 8fa295e6df
commit f29f44e8ac
249 changed files with 17130 additions and 55 deletions

View File

@@ -0,0 +1,26 @@
using UnityEngine;
using Unity.Netcode;
public class AutoHost : MonoBehaviour
{
// 에디터에서만 작동하도록 설정
void Start()
{
#if UNITY_EDITOR
// 1. NetworkManager가 씬에 존재하는지 확인
if (NetworkManager.Singleton != null)
{
// 2. 이미 서버나 클라이언트가 실행 중이 아닐 때만 실행
if (!NetworkManager.Singleton.IsServer && !NetworkManager.Singleton.IsClient)
{
NetworkManager.Singleton.StartHost();
Debug.Log("<color=yellow><b>[AutoHost]</b> 에디터 전용 호스트 자동 시작됨</color>");
}
}
else
{
Debug.LogError("[AutoHost] NetworkManager를 찾을 수 없습니다!");
}
#endif
}
}