Struct NetDebug
Singleton handling NetCode logging and log management.
Implements
Inherited Members
Namespace: Unity.NetCode
Assembly: Unity.NetCode.dll
Syntax
public struct NetDebug : IComponentData, IQueryTypeParameter
Properties
LogLevel
The current debug logging level. Default value is Notify.
Declaration
[ExcludeFromBurstCompatTesting("may use managed objects")]
public NetDebug.LogLevelType LogLevel { get; set; }
Property Value
Type | Description |
---|---|
Net |
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). Age. Set to 0 to opt out.
Declaration
public ushort MaxRpcAgeFrames { readonly get; set; }
Property Value
Type | Description |
---|---|
ushort |
SuppressApplicationRunInBackgroundWarning
If you disable runProject Settings... Player... Resolution and Presentation... Run In Background
.
Declaration
public bool SuppressApplicationRunInBackgroundWarning { readonly get; set; }
Property Value
Type | Description |
---|---|
bool |
Remarks
Setting Suppress
SuppressApprovalRpcSentWhenApprovalFlowDisabledWarning
When debugging, it's helpful to treat 'sending an IApproval
Declaration
public bool SuppressApprovalRpcSentWhenApprovalFlowDisabledWarning { readonly get; set; }
Property Value
Type | Description |
---|---|
bool |
Methods
DebugLog(in FixedString512Bytes)
Print the log message with Debug level priority;
Declaration
public readonly void DebugLog(in FixedString512Bytes msg)
Parameters
Type | Name | Description |
---|---|---|
Fixed |
msg | The ascii message string. Unicode are not supported |
Dispose()
Destroy the internal resources allocated by the debug logger and flush any pending messages.
Declaration
public void Dispose()
Log(in FixedString512Bytes)
Print a log message with Notify level priority;
Declaration
public readonly void Log(in FixedString512Bytes msg)
Parameters
Type | Name | Description |
---|---|---|
Fixed |
msg | The ascii message string. Unicode are not supported |
LogError(in FixedString512Bytes)
Print a log message with error priority
Declaration
public readonly void LogError(in FixedString512Bytes msg)
Parameters
Type | Name | Description |
---|---|---|
Fixed |
msg | The ascii message string. Unicode are not supported |
LogFolderForPlatform()
Use this method to retrieve the platform specific folder where the NetCode logs files
will be stored.
On Desktop it use the console
In all cases, if the log path is null or empty, the Logs folder in the current directory is used instead.
Declaration
public static string LogFolderForPlatform()
Returns
Type | Description |
---|---|
string | A string containg the log folder full path |
LogWarning(in FixedString512Bytes)
Print a log message with warning priority
Declaration
public readonly void LogWarning(in FixedString512Bytes msg)
Parameters
Type | Name | Description |
---|---|---|
Fixed |
msg | The ascii message string. Unicode are not supported |
PrintHex(uint)
Print an unsigned integer in hexadecimal format
Declaration
public static FixedString32Bytes PrintHex(uint value)
Parameters
Type | Name | Description |
---|---|---|
uint | value | The unsigned value to convert |
Returns
Type | Description |
---|---|
Fixed |
PrintHex(ulong)
Print a unsigned long integer in hexadecimal format
Declaration
public static FixedString32Bytes PrintHex(ulong value)
Parameters
Type | Name | Description |
---|---|---|
ulong | value | The unsigned value to convert |
Returns
Type | Description |
---|---|
Fixed |