docs.unity3d.com
    Show / Hide Table of Contents

    Struct CommandDataInterpolationDelay

    Optional component used to access the interpolation delay in order to implement lag compensation on the server. Also exists on predicted clients (but the interpolation delay will always be 0).

    The component is not baked during conversion by default, and should be added explicitly by the user at one of two points:

    1. At conversion time: By using the checkbox in GhostAuthoringComponent or your own Baker.

    2. At runtime: After the entity is spawned.

    Inherited Members
    ValueType.Equals(Object)
    ValueType.GetHashCode()
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    Namespace: Unity.NetCode
    Syntax
    public struct CommandDataInterpolationDelay : IComponentData, IQueryTypeParameter
    Remarks

    When the component is present on a ghost, the CommandReceiveSystem<TCommandDataSerializer, TCommandData>.ReceiveJobData will automatically update the Delay value with the latest reported interpolation delay from this connection (i.e. the connection that is sending the command for this entity). As such, the component is updated only for entities that are predicted, and that have at least one input command buffer.

    Fields

    Delay

    The latest reported interpolation delay reported for this entity. The delay value is update every time the target entity receive commands. If the client switch target for commands (ex: enter a vehicle), by either changing the CommandTarget or by enabling another AutoCommandTarget, the value of the delay become stale: is never reset to 0 and will remain the same as repoted by the last command.

    Declaration
    public uint Delay
    Field Value
    Type Description
    UInt32
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023