Debug.log()和print()函数有什么区别?

Wad*_*ade 0 c#

Debug.Log("Hello there!");
print("Hello there");
Run Code Online (Sandbox Code Playgroud)

这两个语句在控制台上显示相同的输出,那有什么区别?

Par*_*and 5

在本机.NET Framework中,您的示例都不存在.最接近的功能是通过System.Diagnostics.DebugSystem.Diagnostics.Trace.

如果你在谈论Unity,那么行为是相同的:

将消息记录到Unity控制台(与Debug.Log相同).

资源