Skip to content

Commit aa83ec7

Browse files
Merge branch 'develop' into fix/offline-network-variable
2 parents b1feb94 + 31e5e1d commit aa83ec7

File tree

4 files changed

+26
-10
lines changed

4 files changed

+26
-10
lines changed

com.unity.netcode.gameobjects/CHANGELOG.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,16 @@ Additional documentation and release notes are available at [Multiplayer Documen
1212

1313
### Fixed
1414

15+
- Fixed the "Generate Default Network Prefabs List" setting not loading correctly and always reverting to being checked. (#2545)
16+
- Fixed usage of `NetworkList` throwing exception when used without a NetworkManager in scene. (#2539)
17+
- Fixed the inspector throwing exceptions when attempting to render `NetworkVariable`s of enum types. (#2529)
18+
- Making a `NetworkVariable` with an `INetworkSerializable` type that doesn't meet the `new()` constraint will now create a compile-time error instead of an editor crash (#2528)
1519
- Fixed Multiplayer Tools package installation docs page link on the NetworkManager popup. (#2526)
20+
- Fixed an exception and error logging when two different objects are shown and hidden on the same frame (#2524)
1621
- Fixed a memory leak in `UnityTransport` that occurred if `StartClient` failed. (#2518)
1722
- Fixed issue where a client could throw an exception if abruptly disconnected from a network session with one or more spawned `NetworkObject`(s). (#2510)
1823
- Fixed issue where invalid endpoint addresses were not being detected and returning false from NGO UnityTransport. (#2496)
1924
- Fixed some errors that could occur if a connection is lost and the loss is detected when attempting to write to the socket. (#2495)
20-
- Making a `NetworkVariable` with an `INetworkSerializable` type that doesn't meet the `new()` constraint will now create a compile-time error instead of an editor crash (#2528)
21-
- Fixed the inspector throwing exceptions when attempting to render `NetworkVariable`s of enum types. (#2529)
22-
- Fixed an exception and error logging when two different objects are shown and hidden on the same frame (#2524)
23-
- Fixed usage of `NetworkList` throwing exception when used without a NetworkManager in scene. (#2539)
2425

2526
## Changed
2627

com.unity.netcode.gameobjects/Documentation~/index.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ Netcode for GameObjects is a Unity package that provides networking capabilities
77
See guides below to install Unity Netcode for GameObjects, set up your project, and get started with your first networked game:
88

99
- [Documentation](https://docs-multiplayer.unity3d.com/netcode/current/about)
10-
- [Installation](https://docs-multiplayer.unity3d.com/netcode/current/migration/install)
11-
- [First Steps](https://docs-multiplayer.unity3d.com/netcode/current/tutorials/helloworld/helloworldintro)
10+
- [Installation](https://docs-multiplayer.unity3d.com/netcode/current/installation)
11+
- [First Steps](https://docs-multiplayer.unity3d.com/netcode/current/tutorials/get-started-ngo)
1212
- [API Reference](https://docs-multiplayer.unity3d.com/netcode/current/api/introduction)
1313

1414
# Technical details
@@ -32,4 +32,4 @@ On the following runtime platforms:
3232
|June 3, 2021|Update document to acknowledge Unity min version change. Matches package version 0.2.0|
3333
|August 5, 2021|Update product/package name|
3434
|September 9,2021|Updated the links and name of the file.|
35-
|April 20, 2022|Updated links|
35+
|April 20, 2022|Updated links|

com.unity.netcode.gameobjects/Editor/Configuration/NetcodeForGameObjectsSettings.cs

+16-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using UnityEditor;
22
using UnityEngine;
3+
using UnityEngine.Serialization;
34

45

56
namespace Unity.Netcode.Editor.Configuration
@@ -43,7 +44,21 @@ internal static void SetAutoAddNetworkObjectSetting(bool autoAddSetting)
4344
[FilePath("ProjectSettings/NetcodeForGameObjects.settings", FilePathAttribute.Location.ProjectFolder)]
4445
internal class NetcodeForGameObjectsProjectSettings : ScriptableSingleton<NetcodeForGameObjectsProjectSettings>
4546
{
46-
[SerializeField] public bool GenerateDefaultNetworkPrefabs = true;
47+
[SerializeField]
48+
[FormerlySerializedAs("GenerateDefaultNetworkPrefabs")]
49+
private byte m_GenerateDefaultNetworkPrefabs;
50+
51+
public bool GenerateDefaultNetworkPrefabs
52+
{
53+
get
54+
{
55+
return m_GenerateDefaultNetworkPrefabs != 0;
56+
}
57+
set
58+
{
59+
m_GenerateDefaultNetworkPrefabs = (byte)(value ? 1 : 0);
60+
}
61+
}
4762

4863
internal void SaveSettings()
4964
{

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ private bool ClientBindAndConnect()
524524
//reflection, but this does not live in the context of a performance-critical loop, it runs once at initial connection time.
525525
if (m_RelayServerData.Equals(default(RelayServerData)))
526526
{
527-
Debug.LogError("You must call SetRelayServerData() at least once before calling StartRelayServer.");
527+
Debug.LogError("You must call SetRelayServerData() at least once before calling StartClient.");
528528
return false;
529529
}
530530

@@ -710,7 +710,7 @@ private bool StartRelayServer()
710710
//reflection, but this does not live in the context of a performance-critical loop, it runs once at initial connection time.
711711
if (m_RelayServerData.Equals(default(RelayServerData)))
712712
{
713-
Debug.LogError("You must call SetRelayServerData() at least once before calling StartRelayServer.");
713+
Debug.LogError("You must call SetRelayServerData() at least once before calling StartServer.");
714714
return false;
715715
}
716716
else

0 commit comments

Comments
 (0)