Struct NetDebug
Singleton handling NetCode logging and log management.
Inherited Members
Namespace: Unity.NetCode
Assembly: solution.dll
Syntax
public struct NetDebug : IComponentData, IQueryTypeParameter
Properties
Name | Description |
---|---|
LogLevel | The current debug logging level. Default value is Notify. |
MaxRpcAgeFrames | A NetCode RPC will trigger a warning if it hasn't been consumed or destroyed (which is a proxy for 'handled') after this many simulation frames (inclusive). ReceiveRpcCommandRequest.Age. Set to 0 to opt out. |
SuppressApplicationRunInBackgroundWarning | If you disable runInBackground, users will experience client disconnects
when tabbing out of (or otherwise un-focusing) your game application.
It is therefore highly recommended to enable "Run in "Background" via ticking |
Methods
Name | Description |
---|---|
DebugLog(in FixedString512Bytes) | Print the log message with Debug level priority; |
Dispose() | Destroy the internal resources allocated by the debug logger and flush any pending messages. |
Log(in FixedString512Bytes) | Print a log message with Notify level priority; |
LogError(in FixedString512Bytes) | Print a log message with error priority |
LogFolderForPlatform() | Use this method to retrieve the platform specific folder where the NetCode logs files will be stored. On Desktop it use the consoleLogPath is used. For mobile, the persistentDataPath is used. For DOTS Runtime builds, it is possible to customise the output by using the -logfile command line switch. In all cases, if the log path is null or empty, the Logs folder in the current directory is used instead. |
LogWarning(in FixedString512Bytes) | Print a log message with warning priority |
PrintHex(uint) | Print an unsigned integer in hexadecimal format |
PrintHex(ulong) | Print a unsigned long integer in hexadecimal format |