docs.unity.cn
Search Results for

    Show / Hide Table of Contents

    Struct SnapshotPacketLossStatistics

    Added to Unity.NetCode.NetworkMetrics, stores snapshot related loss calculated via GhostReceiveSystem.

    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetType()
    Namespace: Unity.NetCode
    Assembly: solution.dll
    Syntax
    public struct SnapshotPacketLossStatistics
    Remarks

    Very similar approach to UnreliableSequencedPipelineStage.Statistics.

    Fields

    Name Description
    NumPacketsCulledAsArrivedOnSameFrame

    The Netcode package can only process one snapshot per render frame. If 2+ arrive on the same frame, we'll clobber one of them without processing it.

    NumPacketsCulledOutOfOrder

    Counts the number of snapshot packets dropped (i.e. "culled") due to invalid SequenceId. I.e. Implies the packet arrived, but out of order.

    NumPacketsDroppedNeverArrived

    Detects gaps in CurrentSnapshotSequenceId to determine real packet loss.

    NumPacketsReceived

    Count of snapshot packets received - on the client - from the server.

    Properties

    Name Description
    ArrivedOnTheSameFrameClobberedPacketLossPercent

    Percentage of all snapshot packets - that we assume must have been sent to us (based on SequenceId) - which are culled due to arriving on the same frame as another snapshot.

    CombinedPacketLossCount

    Count of packets lost in some form.

    CombinedPacketLossPercent

    Percentage of all snapshot packets - that we assume must have been sent to us (based on SequenceId) - which are dropped (for any reason).

    NetworkPacketLossPercent

    Percentage of all snapshot packets - that we assume must have been sent to us (based on SequenceId) - which are lost due to network-caused packet loss.

    OutOfOrderPacketLossPercent

    Percentage of all snapshot packets - that we assume must have been sent to us (based on SequenceId) - which are lost due to arriving out of order (and thus being culled).

    Methods

    Name Description
    ToFixedString()

    Dumps all the statistic info.

    Operators

    Name Description
    operator +(SnapshotPacketLossStatistics, SnapshotPacketLossStatistics)
    operator -(SnapshotPacketLossStatistics, SnapshotPacketLossStatistics)
    In This Article
    Back to top
    Copyright © 2023 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)