Skip to content

Commit 30d4487

Browse files
author
Unity Technologies
committed
## [1.9.2] - 2025-10-31 ### Fixed * Removed warning that spams console when `ClientServerTickRate.TargetFrameRateMode` is set to `Sleep`.
1 parent 5422a77 commit 30d4487

File tree

13 files changed

+30
-14
lines changed

13 files changed

+30
-14
lines changed

.attestation.p7m

0 Bytes
Binary file not shown.

.signature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"timestamp":1760441770,"signature":"FHoPasjdrAXz35Q4zTOgfzM9S8Vp5PSzR4BFK69WyYz310CWh3hPaBWbWT0epSuOZIOmLHz1MkwlTv7a7toa7jnVVjFN8MrjZG/A2CCR4sQBe4bimFcQAKy50KFwZDK5myFHVAqPAkM/mVNAmU+txj/IsZU4cusWDmfa9yv0vn78cxZ7IAXSV+7p0EGm4XvONeXJxSYeYDa9tMDuiVRi1QkyIZ2kd/f3gCpG6nVNV+lo7mufjI4RhrkwzKy6Vrkxn7zbLuoz6/M/FO8mAlb1Wynq2YNddcda/CSSoBAPib52mm8wr8YDERUeAeA3xGLfjEx8RT4POhddAmWVgBRwdDRpQfgkeDNY3CIa8MpTr5QeVpxxySm+OgR+Zn15+wsBIkJzm+pC/jxsvIX/829GE0COwryalDkN1plzotXRWFaeAHEKV53zmzwjukwjlvDi8fGYSNFhnLjKJURTFo2LZl/AGBn4zuzEI00L8dsBTwJZrEXcdzzto6fCgujI5zcu","publicKey":"LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUlJQm9qQU5CZ2txaGtpRzl3MEJBUUVGQUFPQ0FZOEFNSUlCaWdLQ0FZRUFzdUhXYUhsZ0I1cVF4ZEJjTlJKSAordHR4SmoxcVY1NTdvMlZaRE1XaXhYRVBkRTBEMVFkT1JIRXNSS1RscmplUXlERU83ZlNQS0ZwZ1A3MU5TTnJCCkFHM2NFSU45aHNQVDhOVmllZmdWem5QTkVMenFkVmdEbFhpb2VpUnV6OERKWFgvblpmU1JWKytwbk9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weBcnw7pC4FZAWo","publicKey":"LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUlJQm9qQU5CZ2txaGtpRzl3MEJBUUVGQUFPQ0FZOEFNSUlCaWdLQ0FZRUFzdUhXYUhsZ0I1cVF4ZEJjTlJKSAordHR4SmoxcVY1NTdvMlZaRE1XaXhYRVBkRTBEMVFkT1JIRXNSS1RscmplUXlERU83ZlNQS0ZwZ1A3MU5TTnJCCkFHM2NFSU45aHNQVDhOVmllZmdWem5QTkVMenFkVmdEbFhpb2VpUnV6OERKWFgvblpmU1JWKytwbk9ySTRibG4KS0twelJlNW14OTc1SjhxZ1FvRktKT0NNRlpHdkJMR2MxSzZZaEIzOHJFODZCZzgzbUovWjBEYkVmQjBxZm13cgo2ZDVFUXFsd0E5Y3JZT1YyV1VpWXprSnBLNmJZNzRZNmM1TmpBcEFKeGNiaTFOaDlRVEhUcU44N0ZtMDF0R1ZwCjVNd1pXSWZuYVRUemEvTGZLelR5U0pka0tldEZMVGdkYXpMYlpzUEE2aHBSK0FJRTJhc0tLTi84UUk1N3UzU2cKL2xyMnZKS1IvU2l5eEN1Q20vQWJkYnJMbXk0WjlSdm1jMGdpclA4T0lLQWxBRWZ2TzV5Z2hSKy8vd1RpTFlzUQp1SllDM0V2UE16ZGdKUzdGR2FscnFLZzlPTCsxVzROY05yNWdveVdSUUJ0cktKaWlTZEJVWmVxb0RvSUY5NHpCCndGbzJJT1JFdXFqcU51M3diMWZIM3p1dGdtalFra3IxVjJhd3hmcExLWlROQWdNQkFBRT0KLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0tCg"}

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22
uid: changelog
33
---
44

5+
## [1.9.2] - 2025-10-31
6+
7+
### Fixed
8+
9+
* Removed warning that spams console when `ClientServerTickRate.TargetFrameRateMode` is set to `Sleep`.
10+
11+
512
## [1.9.1] - 2025-10-11
613

714
### Changed

Runtime/PredictionTicking/NetworkTime.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,9 +296,7 @@ public void OnUpdate(ref SystemState state)
296296
else
297297
{
298298
var serverRateManager = rateManager as NetcodeServerRateManager;
299-
#pragma warning disable CS0618 // Type or member is obsolete
300299
networkTime.IsOffFrame = !serverRateManager.WillUpdateInternal();
301-
#pragma warning restore CS0618 // Type or member is obsolete
302300
}
303301
}
304302
else

Runtime/PredictionTicking/UpdateRateManagement/NetcodeServerRateManager.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,12 +152,13 @@ internal bool WillUpdateInternal()
152152
m_ClientSeverTickRateQuery.TryGetSingleton<ClientServerTickRate>(out var tickRate);
153153
tickRate.ResolveDefaults();
154154

155-
if (TimeTracker.ShouldSleep(tickRate))
155+
var totalSteps = TimeTracker.GetUpdateCountReadonly(m_Group.World.Time.DeltaTime, tickRate.SimulationFixedTimeStep, tickRate.MaxSimulationStepsPerFrame, tickRate.MaxSimulationStepBatchSize).TotalSteps;
156+
if (TimeTracker.ShouldSleep(tickRate) && totalSteps != 1)
156157
{
157-
Debug.LogWarning($"Testing if will update when {nameof(ClientServerTickRate.TargetFrameRateMode)} is set to {nameof(ClientServerTickRate.FrameRateMode.Sleep)}. This will always return true.");
158+
Debug.LogWarning($"Expected server to always update once per frame when in sleep mode. Ran {totalSteps} steps. If you are setting Application.targetFrameRate, please remove that. If not, please report a bug.");
158159
}
159160

160-
return TimeTracker.GetUpdateCountReadonly(m_Group.World.Time.DeltaTime, tickRate.SimulationFixedTimeStep, tickRate.MaxSimulationStepsPerFrame, tickRate.MaxSimulationStepBatchSize).TotalSteps > 0;
161+
return totalSteps > 0;
161162
}
162163
}
163164
}
0 Bytes
Binary file not shown.
12 Bytes
Binary file not shown.
512 Bytes
Binary file not shown.
96 Bytes
Binary file not shown.

Runtime/SourceGenerators/Source~/NetCodeSourceGenerator/Generators/NetCodeSourceGenerator.cs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,18 @@ private static void Generate(GeneratorExecutionContext executionContext, IDiagno
178178
if(!executionContext.GetOptionsFlag(GlobalOptions.DisableRerencesChecks))
179179
{
180180
//Make sure the assembly has the right references and treat them as a fatal error
181-
var missingReferences = new HashSet<string>{"Unity.Collections", "Unity.Burst", "Unity.Mathematics"};
181+
var missingReferences = new HashSet<string>{"Unity.Collections", "Unity.Burst"};
182+
var hasMathematics = false;
182183
foreach (var r in executionContext.Compilation.ReferencedAssemblyNames)
184+
{
183185
missingReferences.Remove(r.Name);
186+
// Check for either Unity.Mathematics or UnityEngine.MathematicsModule
187+
if (r.Name == "Unity.Mathematics" || r.Name == "UnityEngine.MathematicsModule")
188+
hasMathematics = true;
189+
}
190+
if (!hasMathematics)
191+
missingReferences.Add("Unity.Mathematics"); // Keeping the error to just Unity.Mathematics
192+
184193
if (missingReferences.Count > 0)
185194
{
186195
codeGenerationContext.diagnostic.LogError(

0 commit comments

Comments
 (0)