Skip to content

Commit c449203

Browse files
Merge branch 'develop-2.0.0' into fix/2.x/nbu-heap-alloc
2 parents 174117f + e7b14c2 commit c449203

File tree

2 files changed

+28
-5
lines changed

2 files changed

+28
-5
lines changed

com.unity.netcode.gameobjects/CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,19 @@ Additional documentation and release notes are available at [Multiplayer Documen
1010

1111
### Added
1212

13+
14+
### Fixed
15+
16+
- Fixed issue where viewing a `NetworkBehaviour` with one or more `NetworkVariable` fields could throw an exception if running a distributed authority network topology with a local (DAHost) host and viewed on the host when the host is not the authority of the associated `NetworkObject`. (#3578)
17+
- Fixed issue when using a distributed authority network topology and viewing a `NetworkBehaviour` with one or more `NetworkVariable` fields in the inspector view would not show editable fields. (#3578)
18+
19+
### Changed
20+
21+
22+
## [2.5.0] - 2025-08-01
23+
24+
### Added
25+
1326
- Added serializer for `Pose` (#3546)
1427
- Added methods `GetDefaultNetworkSettings` and `GetDefaultPipelineConfigurations` to `UnityTransport`. These can be used to retrieve the default settings and pipeline stages that are used by `UnityTransport`. This is useful when providing a custom driver constructor through `UnityTransport.s_DriverConstructor`, since it allows reusing or tuning the existing configuration instead of trying to recreate it. This means a transport with a custom driver can now easily benefit from most of the features of `UnityTransport`, like integration with the Network Simulator and Network Profiler from the multiplayer tools package. (#3501)
1528
- Added mappings between `ClientId` and `TransportId`. (#3516)

com.unity.netcode.gameobjects/Runtime/Core/NetworkBehaviour.cs

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -529,11 +529,21 @@ public bool IsSessionOwner
529529

530530
internal bool IsBehaviourEditable()
531531
{
532-
// Only server can MODIFY. So allow modification if network is either not running or we are server
533-
return !m_NetworkObject ||
534-
m_NetworkObject.NetworkManager == null ||
535-
m_NetworkObject.NetworkManager.IsListening == false ||
536-
m_NetworkObject.NetworkManager.IsServer;
532+
if (!m_NetworkObject)
533+
{
534+
return true;
535+
}
536+
537+
if (!m_NetworkObject.NetworkManager)
538+
{
539+
return true;
540+
}
541+
542+
var networkManager = m_NetworkObject.NetworkManager;
543+
544+
// Only the authority can MODIFY. So allow modification if network is either not running or we are the authority.
545+
return !networkManager.IsListening ||
546+
((networkManager.DistributedAuthorityMode && m_NetworkObject.IsOwner) || (!networkManager.DistributedAuthorityMode && networkManager.IsServer));
537547
}
538548

539549
// TODO: this needs an overhaul. It's expensive, it's ja little naive in how it looks for networkObject in

0 commit comments

Comments
 (0)