Skip to content

0.6.0-preview.7

Pre-release
Pre-release

Choose a tag to compare

@marwie marwie released this 22 Jan 17:15

[0.6.0] - 2020-11-26

New features

  • Added DynamicBuffers serialization support to ghosts. Like IComponentData, is now possible to annotate IBufferElementData with GhostComponentAttribute and members with GhostFieldAttribute
    and having the buffers replicated through the network.
  • ICommandData are now serializable and can be sent to the remote players.
  • Added new SendToOwner property to the GhostComponentAttribute that can be used to configure to witch
    subset of players the component should be sent to: only to the owner, only to the non owner, or all.
  • Ghost Component Serialization Variant. A new GhostComponentVariation attribute has been introduced that let you to specify different serialization options for a component or buffer, by overriding
    the [GhostField] and [GhostComponent] properties present in the original type definition.
  • It is possible to prevent a component to support variation by using the [DontSupportVariation] attribute. When present, if a GhostComponentVariation is defined for that type, an exception is triggered.
  • Ghost components attributes and serialization variants can be customized per prefabs. For every component in a ghost prefab, it is possible to change:
    • PrefabType
    • GhostSendType
    • The variant to use, if variants for that component exist.
  • Is possible to prevent a component to support per-prefab overrides by using the [DontSupportPrefabOverride] attribute. When present, the component can't be further customized in the inspector.
  • It's now possible to register a prediction smoothing function, by calling the GhostPredictionSmoothingSystem.RegisterSmoothingAction<ComponentType>(SmoothingActionDelegate) and supplying a ComponentType and GhostPredictionSmoothingSystem.SmoothingActionDelegate (see Runtime/Snapshot/DefaultUserParams.cs for an example).
  • Added a new ClientTickRate component which when added to a singleton entity controls the interpolation times used to calculate time on the client. The default values can be accessed through the static NetworkTimeSystem.DefaultClientTickRate.
  • Added support for extrapolation when the tick being applied to interpolated ghosts on the client has not been received yet and is outside the interpolation delay. Set the new Smoothing field in the GhostField attribute to SmoothingAction.InterpolateAndExtrapolate to enable extrapolation.
  • Added a MaxSmoothingDistance parameter to the [GhostField] attribute. If specified interpolation will be disabled when the values change more than that limit between two snapshots. This is useful for dealing with teleportation and similar changes which should not be interpolated.

Changes

  • It is no longer required to create a ghost collection, as long as there is a prefab for a ghost it will be picked up automatically. You can create a prefab by referencing it in a spawner component or by placing a pre spawned instance of a ghost.

Fixes

  • Fixed an issue where the elapsed time was not using the max simulation rate - causing the fixed time step physics to take more and more time.
  • Fixed an issue causing time rollbacks when running client and server in the editor if performance is too low.

Upgrade guide

The Interpolate bool in the GhostField attribute has been replaced with Smoothing. Replace Interpolate=true with Smoothing=SmoothingAction.Interpolate to keep the old value, or set it to SmoothingAction.InterpolateAndExtrapolate to enable extrapolation.

[0.5.0] - 2020-10-01

New features

  • Added RpcSystem.DynamicAssemblyList which can be used to delay the checksums for RPCs and ghost components when the set of assemblies are different on the client and server.
  • Added to RPC and Command the possiblity to send Entity reference from both client and server.

Changes

  • Change the system ordering to be compatible with latest physics. NetworkTimeSystem has moved to ClientInitializationSystemGroup. The SimulationSystemGroup runs GhostSpawnSystemGroup (client), GhostReceiveSystemGroup and GhostSimulationSystemGroup before FixedStepSimulationSystemGroup where physics is running. RpcCommandRequestSystemGroup, RpcSystem and GhostSendSystem (server) is running at the end of the frame, after all simulation code. Other systems has been moved into one of the groups.
  • Created a new GhostInputSystemGroup where systems adding inputs to the input buffer should run.

Fixes

Upgrade guide

  • The systems adding input to the ICommandData buffer needs to be moved to GhostInputSystemGroup