Print是MonoBehaviour的一个成员。Debug则是一个密闭的类。
所以在使用的范围上,Print必须要继承MonoBehaviour类,而Debug不用。
通过反编译,我们可以看到print方法具体如下:
public static void print(object message)
{
Debug.Log(message);
}
这说明print方法还是通过debug.log实现的,所以print和debug.log在实质上是没区别的,print就是debug.log的一个简单封装。
是有输出的,只是输出大量为空。
1、input.inputstring的值很快就会清空。官方描述:returns the keyboard input entered this frame. (read only)即,返回某一帧的键盘输入,下一帧就会被清空
2、使用input.getkeydown时,系统是有一定的延迟时间。官方描述:returns true during the frame the user starts pressing down the key identified by name.即该函数用于判定是否一直按着某个键
所以可以改用input.getkey函数。
另外由于1帧可以检测到多个input.getkey,所以会在按下a键时输出一次,之后会输出若干次空值
Photoshop|
Dreamweaver|
SVG|
WebGL|
Visual Studio|
PowerDesigner|
Eclipse|
Git|
Apache Ant|
Atom|
Composer|
CodeSmith|
Flex|
Gradle|
Maven|
Sublime Text3|
SVN|
Tableau|
Vim|
Chrome开发者工具|
OpenGL|
Unity|
Direct3D|
用户登录
还没有账号?立即注册
用户注册
投稿取消
| 文章分类: |
|
还能输入300字
上传中....
烟花寂寞丶