Skip to content

Releases: needle-mirror/com.unity.netcode

0.1.0-preview.6

26 May 03:29
Compare
Choose a tag to compare
0.1.0-preview.6 Pre-release
Pre-release

[0.1.0-preview.6] - 2020-02-24

New features

  • Added integration with UnityPhysics, including the lag compensation from DotsSample. To use it you must have the UnityPhysics added to your project.

Changes

  • Unity Transport has been upgraded to 0.3.0 which required some API changes - see "Upgrade guide".
  • All FunctionPointer instances are cached in statics to reduce the number of calls to compile.
  • The helper method RpcExecutor.ExecuteCreateRequestComponent returns the entity it creates.
  • Added an interface to NetworkStreamReceiveSystem which is used when creating the driver. It is possible to set NetworkStreamReceiveSystem.s_DriverConstructor to a custom instance during bootstrapping to create drivers in a custom way.
  • Removed World.Active workaround since it has been deprecated for a while and is causing problems with conversion at runtime.
  • Slightly improved performance by ensuring that all jobs that can be Burst compiled are
  • Ghost types are now selected based on the guid of the ghosts prefab asset instead of the archetype. This makes it possible to have multiple different ghosts with the same archetype. If a ghost is not a valid prefab you will get an error during conversion.

Fixes

  • Fixed an issue where ghost prefabs created from GameObject instances were processed by all systems.
  • The code gen now only writes files if they are modified.
  • Disposing a client or server world will now unregister it from the tick system to prevent errors.
  • Take the latency of command age updates into account when calculating time scale to get more stable inputs with high ping.

Upgrade guide

Unity Transport has been upgraded to 0.3.0 which changes the API for DataStreamReader and DataStreamWriter.

The IRpcCommand and ICommandData have been changed to not take a DataStreamReader.Context.

The ISnapshotData and GhostCollection interfaces have been changed to not take a DataStreamReader.Context, all ghosts and collections must be regenerated.

GhostDistanceImportance.NoScale and GhostDistanceImportance.DefaultScale have been replaced by GhostDistanceImportance.NoScaleFunctionPointer and GhostDistanceImportance.DefaultScaleFunctionPointer which are compiled function pointers rather than methods.

0.0.4-preview.0

26 May 03:28
Compare
Choose a tag to compare
0.0.4-preview.0 Pre-release
Pre-release

[0.0.4-preview.0] - 2019-12-12

New features

Changes

  • Changed the codegen for NativeString64 to use the serialization in DataStream.

Fixes

Upgrade guide

0.0.3-preview.2

26 May 03:28
Compare
Choose a tag to compare
0.0.3-preview.2 Pre-release
Pre-release

[0.0.3-preview.2] - 2019-12-05

New features

Changes

  • Updated the documentation and added a section about prediction.
  • Upgraded entities to 0.3.0.

Fixes

  • Fixed a crash when multiple clients disconnected on the same frame.
  • Fixed read / write access specifiers in AfterSimulationInterpolationSystem.
  • Fixed build errors in non-development standalone builds.

Upgrade guide

0.0.2-preview.1

26 May 03:28
Compare
Choose a tag to compare
0.0.2-preview.1 Pre-release
Pre-release

[0.0.2-preview.1] - 2019-11-28

New features

Changes

Fixes

  • Fix compile error in generated serialization code for strings.
  • Fix warning when entering playmode with the netcode disabled.

Upgrade guide

0.0.1-preview.6

26 May 03:28
Compare
Choose a tag to compare
0.0.1-preview.6 Pre-release
Pre-release

Change log

[0.0.1-preview.6] - 2019-11-26

New features

  • Made it possible to scale importance based on distance to support more ghosts.
  • Nested entities constaining replicated data are now supported.
  • Entity references now supported as ghost fields. The references are weak references which will resolve to Entity.Null if the target is not guaranteed to exist.
  • NativeString64, enums and bools are supported as ghost fields.
  • ClientServerTickRate added where you can configure certain behavior relating to timestepping. A headless server can be configured to sleep after hitting target framerate to conserve CPU usage.
  • Send different data depending on if the entity is predicted or interpolated, some savings can be done in the predicted case.
  • Added a protocol version which must match for the connection to succeed.
  • Added time graphs and server view to the network debugger.
  • Network simulator now supports jitter.

Changes

  • The authoring flow has been improved.
    • GhostAuthoringComponent now automatically detects what components an entity has after conversion runs and automatically populates them when you press the "Update component list" button. You no longer need to manually type in each component name.
    • Default values can be defined for certain component types, for example with Translation components you usually want to synchronize the Value field. When default handling has been defined the ghost authoring component uses that when it parses the entity component list.
    • [GhostDefaultField] attribute added. This can be added to ghost variable which are to be synchronized. The GhostAuthoringComponent detects these fields.
    • [GhostDefaultComponent] attribute added. This can be used to define default behavior for how a component should be synchronized, InterpolatedClient, PredictedClient and Server.
    • GhostCollectionAuthoringComponent added. This is where all spawned prefabs can be registered
    • Paths are easier in general as you can set up the root of where you want generated files placed and defaults can be specified in code.
    • Which components result in variable data being replicated are marked in bold in the inspector, so it's easier to see how much data will be sent per ghost.
  • Improved snapshot prediction handling
    • Uses the servers delta times now instead of the clients.
    • Support for dynamic timestep and fractional tick prediction.
    • Handles stalls and won't try to replay to far back in the rollback (64 frames is maximum)
    • Less boilerplate code needed to setup a predicted entity, more default handling moved to code generation
    • Added GhostPredictionSystemGroup with better calculations for the currently predicting tick on the client
    • Interpolation time is an offset from prediction time to make sure they do not drift.
  • Multiple inputs are sent together so dropped inputs have less effect on misprediction.
  • Thin clients added, these use fewer resources than full client simulations so it's easier to test with many clients now.
  • An RPC heartbeat system was added which only runs when nothing is being sent from the client to the server, preventing a disconnect timeout from happening. As soon as inputs are sent and snapshot synchronization starts, the system stops running.
  • RPC boilerplate code reduced, when a component inheritingIRpcCommandRequestComponentData is added to an entity along with SendRpcCommandRequestComponent it will be sent automatically.
  • The client/server world bootstrapping has been simplified, you can now use your own custom bootstrapping more easily and create the client/server worlds depending on which one you want at runtime. By default the world creation in the editor is controlled by the playmode tools.
  • NetCodeConversionSettings added which makes it possible to specify which type of build you want (client/server) in the subscene build settings workflow.
  • Detect when ackmask desyncs occur
  • Improved ghost code generation to make it able to regenerate code when there are compile errors.
  • Snapshots are now acknowleged when there is no CommandSendSystem.
  • Use the entities TimeData struct instead of getting time from Client/ServerSimulationSystemGroup

Fixes

  • The code generation in Ghost Authoring Components now generate imports for user namespaces.
  • Code generation triggers an asset database refresh so the modified files are compiled.
  • Command inputs now correctly respects the NetworkStreamInGame being present before starting transmission.
  • Acks can now arrive with bigger interval than 64 ticks
  • Generated code no longer requires unsafe code to be enabled in the project.

Upgrade guide

  • Unity 2019.3 is now required (beta 11 minimum) and Entities 0.2.0-preview.
  • The NetCode folder was moved to a proper package, com.unity.netcode which should now be used instead.
  • All the netcode was moved to a Unity.NetCode namespace.
  • [NotClientServerSystem] attribute removed, use [UpdateInWorld(UpdateInWorld.TargetWorld.Default)] instead, it will do the same thing.
  • GhostPrefabAuthoringComponent removed, use the new GhostCollectionAuthoringComponent instead for setting up ghost data.
  • ClientServerSubScene removed, it's not needed anymore.
  • NetworkTimeSystem.predictTargetTick removed, use GhostPredictionSystemGroup.PredictingTick instead.
  • The interface for RPCs has changed and they no longer require a generated collection.

[0.0.1-preview.2] - 2019-07-17

New features

  • Added a prefab based workflow for specifying ghosts. A prefab can contain a GhostAuthoringComponent which is used to generate code for a ghost. A GhostPrefabAuthoringComponent can be used to instantiate the prefab when spawning ghosts on the client. This replaces the .ghost files, all projects need to be updated to the new ghost definitions.
  • Added ConvertToClientServerEntity which can be used instead of ConvertToEntity to target the client / server worlds in the conversion workflow.
  • Added a ClientServerSubScene component which can be used together with SubScene to trigger sub-scene streaming in the client/ server worlds.

Changes

  • Changed the default behavior for systems in the default groups to be included in the client and server worlds unless they are marked with [NotClientServerSystem]. This makes built-in systems work in multiplayer projects.
  • Made standalone player use the same network simulator settings as the editor when running a development player
  • Made the Server Build option (UNITY_SERVER define) properly set up the right worlds for a dedicated server setup. Setting UNITY_CLIENT in the player settings define results in a client only build being made.
  • Debugger now shows all running servers and clients.

Fixes

  • Change World.Active to the executing world when updating systems.
  • Improve time calculations between client and server.

Upgrade guide

All ghost definitions specified in .ghost files needs to be converted to prefabs. Create a prefab containing a GhostAuthoringComponent and authoring components for all required components. Use the GhostAuthoringComponent to update the component list and generate code.

[0.0.1-preview.1] - 2019-06-05

New features

  • Added support systems for prediction and spawn prediction in the NetCode. These can be used to implement client-side prediction for networked objects.
  • Added some support for generating the code required for replicated objects in the NetCode.
  • Generalized input handling in the NetCode.
  • New fixed timestep code custom for multiplayer worlds.

Changes

  • Split the NetCode into a separate assembly and improved the folder structure to make it easier to use it in other projects.
  • Split the Asteroids sample into separate assemblies for client, server and mixed so it is easier to build dedicated servers without any client-side code.
  • Upgraded Entities to preview 33.

Fixes

Upgrade guide

[0.0.1-preview.0] - 2019-04-16

New features

  • Added a new sample asteroids game which we will be using to develop the new netcode.

Changes

  • Update to Unity.Entities preview 26

Fixes

Upgrade guide

Unity 2019.1 is now required.