Skip to content

0.50.1-preview.19

Pre-release
Pre-release

Choose a tag to compare

[0.50.1] - 2022-03-18

Added

  • Hybrid assemblies will not be included in DOTS Runtime builds.

Changed

  • Changed: Tick systems (Initialization, Simulation, Presentation) are not created as part of the default client-server bootstrap for Hybrid and the Client and Server worlds are updated by the PlayerLoop instead.

Fixed

  • Fixed an exception in PhysicsWorldHistory when enabling lag compensation.
  • Fixed a rare compile error when source generators found invalid data in the package cache.
  • Fixed issue that prevent systems been shown in System Hierarchy window.
  • Fixed an issue where RPCs could be lost in rare cases when sending too many of them.
  • Fix an incorrect overflow exception when pre-spawned or predicted spawned ghost serialize a subset of the fields.

[0.50.0] - 2021-09-17

Added

  • Added new methods GhostSpawnSystem.ConvertGhostToInterpolated and GhostSpawnSystem.ConvertGhostToPredicted for switching the prediction mode of a ghost. The methods have an optional transition time parameter which when not zero will smoothly transition the visual transform from the old to the new state.
  • Made it possible for clients to on demand load ghost prefabs by setting GhostCollectionPrefab.Loading to GhostCollectionPrefab.LoadingState.LoadingActive while the prefab is being loaded.
  • Added the possibility to dynamically load new sub-scenes with pre-spawned ghosts at runtime, while the both server and client are in game.
  • Added the possibility for a client to have only a sub-set of scenes loaded in respect to the server. Client will be able to load / unload them on demand. Creating a singleton with a DisableAutomaticPrespawnSectionReporting component lets you disable the built-in sub-scene synchronisation and implement your own logic. Can be used to implement more complex streaming scenario or other special needs.
  • Support for FirstSendImportanceMultiplier, which can be used to artificially inflate the importance of new (to the client) ghosts. I.e. Allows all ghosts to be sent to the client quickly, even if MinSendImportance is high.
  • A DriverMigrationSystem to allow migration of a NetworkDriver and related Connection Entities. To see a working example look into the WorldMigrationTests
  • Netcode bootstrap can now handle ISystemBase systems.
  • The NetDbg will now auto-connect when you focus on it, or when it's first opened, unless you manually call disconnect.
  • It is now possible to send commands without setting the CommandTargetComponent if the ICommandData is on a ghost which is predicted, owned by the current connection and has SupportAutoCommandTarget enabled in the authoring component. SupportAutoCommandTarget will add a AutoCommandTarget component, the server can set the Enabled member to false to prevent commands from being sent. The AutoCommandTarget can be used to send commands for multiple entities. It is also possible to have multiple ICommandData on the same entity, both for AutoCommandTarget and CommandTargetComponent.
  • Added ClientServerTickRate.MaxSimulationLongStepTimeMultiplier which allows you to run server ticks with longer delta time instead of, or in addition to, running more ticks in a frame.
  • Added ClientServerTickRate.SendSnapshotsForCatchUpTicks to decide if the server should send snapshots for all ticks or just the last when it needs multiple ticks in a frame. The default is to only send snapshot for the last tick.

Changed

  • Changed GhostFieldAttribute.MaxSmoothingDistance from int to float
  • Changed ConnectionAcceptJob.debugPrefix from FixedString32 to FixedString128 to account for longer world names.
  • Made sure despawning can handle large number of ghosts desapwning at the same time. This also reduces the bandwidth required to despawn, but can increase the latency of despawns if there is packet-loss.
  • UpdateInWorld renamed to UpdateInWorldAttribute
  • UpdateInWorld.TargetWorld enum move to Unity.NetCode namespace.
  • Client can now enter/exit from "in game" without the need to disconnect from the server.
  • Server can now stop streaming ghosts to all clients (exit from game), load a new scene/subscene and start streaming ghost again.
  • GhostPredictionDebugSystem only runs when NetDbg is connected and processes more errors in parallel to improve performance.
  • Use stopwatch instead of TimeSpan for dots-runtime portability
  • Improve the handling of ticks when applying ghost state to avoid errors about not having a state to roll back to.
  • Server is now responsible to assign to all the pre-spawned ghosts their unique id.
  • All types in the generated serialiser now use qualified names
  • Debug logging is implemented using com.unity.logging
  • Added validation check on the server side that verify the command target entity, when set, has a ICommandData buffer.
  • Fixed command age not updated on the server if a non null entity target is set but no command data buffer is present. That was causing problem on the clients that were constantly increasing the prediction loop count and dropping the frame rate.
  • Pre-spawned ghost entities are disabled during conversion and re-enabled at runtime after their baseline are initialised. This should prevent user code to modify components before the entities are ready and consequently avoiding pre-spawned ghost hash validation failures.
  • An error is reported if a fields in ICommandData/IRpcCommand or replicated fields in IComponentData/IBufferElement starts with the reserver prefix __GHOST or __COMMAND
  • Replaced the out-out DisableLagCompensation with an opt-in LagCompensationConfig.
  • Removed previously deperecated GhostCollectionAuthoringComponent.
  • Undeprecated ConvertToClientServerEntity. It was deprecated because the old source gen could no support runtime conversion of ghosts, that is not a problem in the new source generator. We still recommend using subscenes for everything involving ghosts.
  • NetworkStreamCloseSystem has been moved to NetworkReceiveSystemGroup.
  • Network connection entities now has LinkedEntityGroup which makes it easier to delete ghosts on disconnection in simple cases.
  • The GhostAuthoringComponent has a new checkbox for adding a GhostOwnerComponent to a ghost without additional authoring components.
  • SceneLoadingTests are not Editor only tests
  • Websocket's DebugWebSocket code fixed for il2cpp tests

Fixed

  • Fixed GhostAuthoringEditor not showing the correct default variant assigned to a component.
  • Fixed memory leak. GhostVariantAssignmentCollection blob data not disposed.
  • Fixed issue with ghost variant cache. GhostComponentVariation attribute where collected only if the annotated struct was public.
  • Stale inputs are no longer stored in the input buffer on the server. This makes it more reliable to compare current input state to last frames state.
  • Avoid overflow in RTT calculation if reported processing time is greater than the calculated delta time
  • Fixed hash calculation for child entities
  • Fixed an inconsistency error thrown when registering a generic job with a generic RPC type by changing the accessibility of 'RpcCommandRequest.SendRpcData' from protected to public
  • Fixed wrong stats packet size that was causing random crashes.
  • Fix GhostStatsSystem try access a NetworkAckComponent singleton when it does not exists (client only)
  • Typo in GhostSnapshotValueULong that cause compilation error when an RPC contains unsigned long fields.
  • LogAssert.ignoreFailingMessages not reset to true, causing some failing tests not being reported.
  • IrrelevantImportanceDownScale is now guarded to not go below 1.
  • SnapshotDataBuffer and SnapshotDynamicDataBuffer now use [InternalBufferCapacity(0)], which will reduce entity size in a chunk.
  • Compilation error due to generated serializer class trying to cast types without prepending the correct namespace.
  • Ghost gen fails with GhostCodeGen failed for fragment.. if you have a namespace, typename or field name start with double underscores. An error is actually reported if GHOSTXXX or COMMANDXXX keywords are present.
  • UX improvement when creating an invalid Ghost Authoring.
  • No error reported if an component implement multiple interfaces at the same time, causing generating code for the wrong one.
  • PacketLogger output files are now saved for standalone player in Application.consoleLogPath instead of current folder, causing errors in some platform/environment.
  • No compilation errors for missing assemblies references are reported anymore if the assembly that does not contains types which require code-generated serializers.
  • Overriding nested component in a prefab will be assigned correct GameObject reference

Upgrade guide

  • TargetWorld enum is now part of the Unity.NetCode namespace. Find and replace all the UpdateInWorld.TargetWorld occurrences with TargetWorld and continue to keep the enum old value.
  • DisableLagCompensation no longer exists. If you were note using lag compensation you can remove it, if you were using lag compensation you must add a LagCompensationConfig in order for it to run.
  • GhostCollectionAuthoringComponent is now removed, see previous upgrade guide and the getting started doc page for information on what to do instead.