工程:https://download.csdn.net/download/u014773586/89194884
安装模块

切换平台

添加启动端口及ip配置
using System.Collections.Generic;
using Unity.Netcode;
using Unity.Netcode.Transports.UTP;
using UnityEngine;
public class NetworkCommandLine : MonoBehaviour
{
private NetworkManager netManager;
void Start()
{
netManager = GetComponentInParent<NetworkManager>();
if (Application.isEditor) return;
// 获取命令行参数映射
var args = GetCommandlineArgs();
// 获取ip
if (args.TryGetValue("-ip",

最低0.47元/天 解锁文章
1686

被折叠的 条评论
为什么被折叠?



