Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/315.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/elixir/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 什么';Debug.log()和print()函数之间的区别是什么?_C# - Fatal编程技术网

C# 什么';Debug.log()和print()函数之间的区别是什么?

C# 什么';Debug.log()和print()函数之间的区别是什么?,c#,C#,这两个语句在控制台上显示相同的输出,那么有什么区别呢?在本机.NET Framework中,两个示例都不存在。最接近的功能是通过System.Diagnostics.Debug或System.Diagnostics.Trace 如果你说的是统一,那么行为是一致的: 将消息记录到Unity控制台(与Debug.Log相同) 在本机.NET Framework中,两个示例都不存在。最接近的功能是通过System.Diagnostics.Debug或System.Diagnostics.Trace 如

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

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

如果你说的是统一,那么行为是一致的:

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


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

如果你说的是统一,那么行为是一致的:

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


这是为C#inside
Unity
print(string)
不是.NET的一部分,您是否在使用其他库或.NET之上的框架,如Unity或Mono?是的,我在Unity中使用它。如果您不从monobehavior继承,print()将无法工作。debug.log()不需要Monobhavior,我不明白为什么要关闭此问题。链接的问题是关于Console.WriteLine vs MonoBehavior.Print,而这个问题是关于Debug.Log vs MonoBehavior.Print这是用于C#inside
Unity
Print(string)
不是.NET的一部分,您是否使用了其他库,或者像Unity或Mono这样的.NET之上的框架?是的,我在unity中使用它。如果不从monobehavior继承,print()将无法工作。debug.log()不需要Monobhavior,我不明白为什么要关闭此问题。链接的问题是关于Console.WriteLine与MonoBehavior.Print的,而这个问题是关于Debug.Log与MonoBehavior.Print的
Debug.Log("Hello there!");
print("Hello there");