Netcode for Entities 1.9.1 is now live! ![]()
Key Updates in This Release
This patch improves the host migration system data gathering speed, it also brings some fixes to code generated fields and more.
Changed
- Host migration system now caches the ghost component types it uses when collecting host migration ghost data, resulting in faster host migration data collections. It’s updated any time the ghost prefab count changes.
GhostField.Quantizationtemplate mismatch errors are now warnings, and will resolve to working code, rather than outputting errors. As a result, we will no longer assume primitive integer types want to disable quantization, as that logic did not cover all cases (e.g. likeEntitystructs etc).- Host migration internal ghost data gathering has improved and should be faster now but add a few bytes of extra data compared to before.
Fixed
- Occasional
MultiplayerPlayModeWindow.HandleHyperLinkArgstruncation error spam. - Unsafe compiler error when using a
fixedarray as aGhostField. Note: You must implement a corresponding safe accessor method implementing ref returns. GhostFieldcompiler error when usingFixedListwith nestedstructtypes, as well as relatedInvalidOperationExceptionin aSubStringcall when using aFixedListwith a primitive type.- Code generator incorrectness when generating struct fields for
GhostFieldFixedListandfixedarray serializers (Entityfields in particular). - Incorrect
curChangeMaskBitsoffset after aFixedListfield is generated, due to incorrectaggregateChangeMaskflag. It’s now forced correct viaforceComposite. FixedList’s andunsafe fixed array) now correctly support non-public structs for the element type (in cases where we know the code-gen will resolve without compiler errors).GhostSnapshotValueEntitynow usesTryGetValuerather than aHasComponentcall followed by a lookup, reducing lookup costs.- Issue where specifying a
LogLevel(via theDefault.globalconfig’sunity.netcode.sourcegenerator.logging_levelproperty) did nothing.