Struct EnablePacketLogging
Add this component to any connection entities (i.e. entities with the NetworkStreamConnection component) to enable detailed netcode packet dump logging.
Implements
IComponentData
IQueryTypeParameter
Inherited Members
Namespace: Unity.NetCode
Assembly: Unity.NetCode.dll
Syntax
public struct EnablePacketLogging : IComponentData, IQueryTypeParameter
Remarks
Packet dumps can be enabled for all connections globally via the Playmode Tools Window.
Alternatively, you can add the NetCodeDebugConfig to any sub-scene (via the NetCodeDebugConfigAuthoring
)
and set the DumpPackets flag to true.
Properties
IsPacketCacheCreated
Check to ensure the packet cache is created, before use.
Declaration
public bool IsPacketCacheCreated { get; }
Property Value
Type | Description |
---|---|
bool |
Methods
LogToPacket(in FixedString512Bytes)
Add your own custom logs to Netcode's per-connection packet dump.
Declaration
public void LogToPacket(in FixedString512Bytes msg)
Parameters
Type | Name | Description |
---|---|---|
FixedString512Bytes | msg | Message to append. Newlines are not automatically added! |
Remarks
For safety reasons, ensure you fetch this component with write access!
Implements
Unity.Entities.IComponentData
Unity.Entities.IQueryTypeParameter