You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
644 B
C#
26 lines
644 B
C#
using Unity.Multiplayer.Samples;
|
|
using Unity.Netcode;
|
|
using UnityEngine;
|
|
|
|
namespace Unity.BossRoom.ConnectionManagement
|
|
{
|
|
class ServerStartingState : ConnectionState
|
|
{
|
|
public override void Enter()
|
|
{
|
|
var success = NetworkManager.Singleton.StartServer();
|
|
if (!success)
|
|
{
|
|
Debug.Log("StartServer returned false and failed starting. Killing process.");
|
|
Application.Quit(1);
|
|
return;
|
|
}
|
|
|
|
m_ConnectionManager.ChangeState(m_ConnectionManager.m_ServerListening);
|
|
}
|
|
|
|
|
|
public override void Exit() { }
|
|
}
|
|
}
|