Skip to content

Commit ec6d03b

Browse files
committed
Fix unknown arg when not dedicated server profile
1 parent 05b794c commit ec6d03b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

com.unity.netcode.gameobjects/Runtime/Transports/UTP/UnityTransport.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -830,9 +830,9 @@ private bool ParseCommandLineOptions(out ushort port)
830830
}
831831

832832
#else
833-
if (GetArg(Environment.GetCommandLineArgs(), arg) is string argValue)
833+
if (GetArg(Environment.GetCommandLineArgs(), k_OverridePortArg) is string argValue)
834834
{
835-
port = (T)Convert.ChangeType(argValue, typeof(T));
835+
port = (ushort)Convert.ChangeType(argValue, typeof(ushort));
836836
return true;
837837
}
838838
#endif

0 commit comments

Comments
 (0)