Print/Debug.Log在Unity Console上未显示输出 [英] Print/Debug.Log is not showing output on Unity Console

查看:2025
本文介绍了Print/Debug.Log在Unity Console上未显示输出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在Unity Console上使用C#打印一个简单的语句,但是我不知道为什么它不打印.

I am trying to print a simple statement using C# on Unity Console but i don't know why it is not printing.

推荐答案

如果打印有效,则Debug.Log也将有效,因此<强>不是问题.

If print does not work, Debug.Log will not work either so that's not the problem.

以下是print在控制台中未显示的可能原因:

These are the possible reasons why print is not showing in the console:

1 .脚本未附加到GameObject.

1.Script is not attached to a GameObject.

2 .脚本附加到的GameObject 处于活动状态.从编辑器中激活它.

2.The GameObject the script is attached to is not Active. Activate it from the Editor.

3 .NumberWizard脚本未启用.启用脚本.

3.The NumberWizard script is not enabled. Enable the script.

4 .未选中 日志切换.

在您的屏幕截图中,调试,警告和错误消息均已启用,因此我们可以排除4中的内容.

From your screenshot, both Debug, Warning and Error messages are enabled, so we can exclude what's in 4.

这篇关于Print/Debug.Log在Unity Console上未显示输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆