Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions com.unity.netcode.gameobjects/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Additional documentation and release notes are available at [Multiplayer Documen

### Changed

- The default listen address of `UnityTransport` is now 0.0.0.0. (#2307)
- Optimized bandwidth usage by encoding most integer fields using variable-length encoding. (#2276)

### Fixed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ private enum State
// frame at 60 FPS. This will be a large over-estimation in any realistic scenario.
private const int k_MaxReliableThroughput = (NetworkParameterConstants.MTU * 32 * 60) / 1000; // bytes per millisecond

private static ConnectionAddressData s_DefaultConnectionAddressData = new ConnectionAddressData { Address = "127.0.0.1", Port = 7777, ServerListenAddress = string.Empty };
private static ConnectionAddressData s_DefaultConnectionAddressData = new ConnectionAddressData { Address = "127.0.0.1", Port = 7777, ServerListenAddress = "0.0.0.0" };

#pragma warning disable IDE1006 // Naming Styles

Expand Down Expand Up @@ -303,9 +303,9 @@ public struct ConnectionAddressData
public ushort Port;

/// <summary>
/// IP address the server will listen on. If not provided, will use 'Address'.
/// IP address the server will listen on. If not provided, will use 0.0.0.0.
/// </summary>
[Tooltip("IP address the server will listen on. If not provided, will use 'Address'.")]
[Tooltip("IP address the server will listen on. If not provided, will use 0.0.0.0.")]
[SerializeField]
public string ServerListenAddress;

Expand All @@ -330,7 +330,7 @@ private static NetworkEndpoint ParseNetworkEndpoint(string ip, ushort port)
/// <summary>
/// Endpoint (IP address and port) server will listen/bind on.
/// </summary>
public NetworkEndpoint ListenEndPoint => ParseNetworkEndpoint((ServerListenAddress?.Length == 0) ? Address : ServerListenAddress, Port);
public NetworkEndpoint ListenEndPoint => ParseNetworkEndpoint((ServerListenAddress?.Length == 0) ? "0.0.0.0" : ServerListenAddress, Port);
}

/// <summary>
Expand Down