ET是开源的游戏服务器和客户端双端Unity框架,许可证为MIT license,可以用于商业开发。仓库地址为:
将仓库克隆到本地,照着Book/1.1运行指南.md中的说明进行运行。这里我使用的操作系统是Windows 10,开发工具为Visual Studio 2022、 .NET 6.0 SDK和Unity 2021.3.26f1c1。
照着文档中的描述基本可以成功运行框架,在此过程中,我遇到了以下报错:
--Console 1 --CreateScenes 1 --LogLevel 2 --Process 1 --StartConfig StartConfig/Localhost
2023-06-03 09:56:25.4643 System.Exception: 请先在cmd中运行: netsh http add urlacl url=http://:你的address中的端口/ user=Everyone, address: http://:30300/
---> System.Net.HttpListenerException (5): 拒绝访问。
at System.Net.HttpListener.AddPrefixCore(String registeredPrefix)
at System.Net.HttpListener.AddAllPrefixes()
at System.Net.HttpListener.Start()
解决方案是根据提示在命令控制台运行以下命令:
执行:netsh http add urlacl url=http://*:30300/ user=Everyone
运行结果是可以鼠标右键操作一角色在地图上移动: