您最多选择25个主题 主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

23 行
734 B

using Unity.Netcode;
using UnityEngine;
namespace Unity.Multiplayer.Samples.BossRoom
{
class ServerStartingState : ConnectionState
{
public override void Enter()
{
var success = NetworkManager.Singleton.StartServer();
if (!success)
{
DedicatedServerUtilities.Log("StartServer returned false and failed starting. Killing process.");
Application.Quit(1); // "1" exit code to tell whatever is running this server something wrong happened.
return;
}
m_ConnectionManager.ChangeState(m_ConnectionManager.m_ServerListening);
}
public override void Exit() { }
}
}