Skip to content

Commit aec318d

Browse files
Apply suggestions from code review
Co-authored-by: Emma <emma.mcmillan@unity3d.com>
1 parent 93a7d71 commit aec318d

2 files changed

Lines changed: 2 additions & 14 deletions

File tree

.yamato/_triggers.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,8 @@ pr_code_changes_checks:
128128

129129

130130
# Unified (NGO + N4E) validation, on demand.
131-
# The unified tests run automatically as part of pr_code_changes_checks and develop_nightly (same as
132-
# the CMB service tests do). This job only exists so they can also be kicked off by commenting
133-
# "/ci unified", for PRs that pr_code_changes_checks does not cover (drafts, doc-only changes, or
134-
# branches targeting something other than develop / develop-3.x.x / release).
131+
# This job allows the Unified tests to be kicked off by commenting "/ci unified".
132+
# This is useful for PRs where pr_code_changes_checks doesn't trigger.
135133
unified_pr_checks:
136134
name: Unified (NGO + N4E) checks [on demand]
137135
dependencies:

com.unity.netcode.gameobjects/Runtime/Transports/Unified/UnifiedNetcodeTransport.cs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -124,13 +124,6 @@ public void OnUpdate(ref SystemState state)
124124
[UpdateBefore(typeof(RpcSystem))]
125125
internal partial class UnifiedNetcodeUpdateSystem : SystemBase
126126
{
127-
// Note: this must be the parameterless ComponentSystemBase.OnCreate override, not the
128-
// ISystem-style OnCreate(ref SystemState). With the ISystem signature this is just a new
129-
// method that Entities never calls, so neither RequireForUpdate takes effect and OnUpdate
130-
// runs from the very first world tick - which is before StartClient/StartServer have
131-
// assigned Transport and NetworkManager below, and therefore a NullReferenceException.
132-
// CreateSingleWorldHost calls AppendWorldToCurrentPlayerLoop, so the world can tick in the
133-
// window between world creation and the transport being started.
134127
protected override void OnCreate()
135128
{
136129
RequireForUpdate<RpcCollection>();
@@ -163,9 +156,6 @@ public void SendRpc(TransportRpc rpc, Entity connectionEntity)
163156

164157
protected override void OnUpdate()
165158
{
166-
// Belt and braces alongside the RequireForUpdate gating in OnCreate: these are only
167-
// assigned once the transport is started but the world can already be in the player loop
168-
// before that happens. Exit early under this scenario.
169159
if (NetworkManager == null || Transport == null)
170160
{
171161
return;

0 commit comments

Comments
 (0)