Skip to content

Qol things - #989

Merged
FirstGearGames merged 12 commits into
FirstGearGames:mainfrom
belplaton:QOL-things
Jan 23, 2026
Merged

FirstGearGames merged 12 commits into
FirstGearGames:mainfrom
belplaton:QOL-things

Conversation

@belplaton

Copy link
Copy Markdown
Contributor

Some important QOL changes that will make the code more stable and user-friendly

belplaton and others added 9 commits December 17, 2025 20:19
[NonSerialized] required because in other case it cause infinity errors in Logs when you select networkmanager in hierarchy

ManagedObjects now observable.
Now we can observer for NetworkObject server/client start/stop events

Now NetworkBehaviour callback safe for error inside user code
These things need to be cleaned up, otherwise after ResetState and respawn they fire and OnChange fires when it shouldn't.

Also... Make sync type settings public explicit
@FirstGearGames

Copy link
Copy Markdown
Owner

Can you please summarize all changes. EG:

  • Improved xyz; now abc
  • Fixed xyz.
  • Added xyz.

@belplaton

belplaton commented Jan 21, 2026

Copy link
Copy Markdown
Contributor Author
  1. Added the necessary references to the asmdefs (CodeGen now explicitly references Burst/Mathematics/Collections, and runtime asmdefs include the missing GUID references).
  2. Changed MakePublicAttribute from internal to public (turned out to be required when creating/using sync types across assemblies).
  3. Added an option to choose whether Kick happens immediately or not (Kick(bool immediately)).
  4. Expanded profiler coverage and made callback execution more resilient (added profiler markers + try/catch around NetworkBehaviour callback invocations so one exception doesn’t derail the whole lifecycle).
  5. Reworked GUID serialization to be allocation-free on the hot path (shared 16-byte buffer + TryWriteBytes).
  6. Added a small helper for GUID byte buffering (Guids.cs) and also added an explicit WriteGuidAllocated method to keep the old allocating path when needed.
  7. Improved NetworkAnimator configurability and hot-path performance (aggressive inlining + runtime synchronization toggle via SetSynchronizationState with extra “can sync” checks).
  8. Tweaked SyncDictionary/SyncHashSet ResetState behavior for cleaner state resets (it now also clears pending on-change lists to avoid carrying stale changes across resets).
  9. Tweaked SyncVar ResetState behavior for cleaner state resets (it now clears server/client OnChange delegates).
  10. Improved public API ergonomics for sync internals (SyncBase.Settings and ISyncVar are now public).
  11. Corrected the ManagedObjects spawned-remove notification so it routes to the intended callback (OnSpawnedChange: Add/Remove).

@FirstGearGames
FirstGearGames merged commit 9a925c0 into FirstGearGames:main Jan 23, 2026
FirstGearGames pushed a commit that referenced this pull request Feb 17, 2026
- Fixed MovePosition/Rotation being unintentionally cleared with velocities (#1009, #1010).
- Fixed NetworkCollider disposing of rather than pooling some collections, resulting in garbage collection.
- Fixed NetworkTrafficStatistics initializing when disabled; this did not result in tracking but did have a neglible runtime performance impact.
- Fixed NetworkTransform.GetChanged including non-synchronized properties (#1016).
- Fixed missing error log when exceeding NetworkBehaviour limit pet NetworkObject.
- Fixed prefab searching being done recursively despite being set not to (#1005 #1015).
- Fixed ObserversRpc.BufferLast not handling ExcludeOwner (#985).
- Fixed smoothers AttachOnStop not working (#1018).
- Improved NetworkTrafficStatics uses TryGetBidirectionalNetworkTraffic rather than assume value is not null. This is to resolve a Unity bug where fields lose value during debug inspection (#1000).
- Improved added additional ProfileMarkers to PredictionManager.
- Improved NetworkTransform performance marginally (#989).
- Improved added ProfileMarkers to ClientManager, ClientObjects/.RpcLinks, NetworkTransform (#989).
- Improved Writer.WriteGuidAllocated obsoleted. Allocations have been removed; use WriteGuid instead (@belplaton).
- Improved added INetworkConnectionBroadcast interface to allow broadcast mocking (#1007).
- Added ManagedObjects.OnSpawnedAdd/Remove/Clear events (#989).
- Added Beta Threaded TickSmoothers (contribution by https://github.com/belplaton)
- Added Beta Threaded Collider Rollback (contribution by https://github.com/belplaton).
- Added ability for NetworkTrafficStatistics to run in headless builds (#1004).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants