Unity3D 07-日志、文本打印
来源:互联网 发布:联通大数据平台 编辑:程序博客网 时间:2024/06/06 03:09
1.Debug.Log(“hello”);
2.打开控制台查看日志:ctrl+shift+c
3.输出一个位置的坐标(需要转换成字符串.ToString())
Vector3 worldPosition = hc.transform.TransformPoint(unityPosition); Debug.Log("worldPosition" + worldPosition.ToString());
4.文本输出多个变量,需要用占位符
this.lbRightHandRotation.text = string.Format ("Right Hand Rotation:{0},{0},{0}", h.Direction.Pitch.ToString() ,h.Direction.Yaw.ToString(), h.Direction.Roll.ToString());
5.文本打印(hour等是int类型)
time_text.text = hour.ToString() + "时" + min.ToString() + "分" + sec.ToString() + "秒";
6.如果使用using System.Diagnostics;
CS0104 ‘Debug’ is an ambiguous reference between ‘System.Diagnostics.Debug’ and ‘UnityEngine.Debug’
如果此时想要打印日志,直接用print(“打印”);
阅读全文
1 0
- Unity3D 07-日志、文本打印
- U3D 日志、文本打印
- U3D 日志、文本打印
- Unity3d游戏之游戏日志打印
- 日志打印
- 日志打印
- 日志打印
- 日志打印
- 打印日志
- 日志打印
- 日志打印
- 日志打印
- 打印日志
- 日志打印
- 打印日志
- 日志打印
- 日志打印
- Unity3D Resources TextAsset 文本
- [leetcode]74. Search a 2D Matrix(Java)
- CentOS-CentOS原始/etc/pam.d/system-auth文件内容
- UIApplication详解
- iOS进阶道路 --SQLite使用
- 简单shell学习(1)
- Unity3D 07-日志、文本打印
- Python 数据类型--字典(dict)基本操作
- 配置https 的时候 nginx +php 遇到关于No input file specified.
- 关于加密
- Java并发容器之LinkedBlockingQueue
- powershell: 判断PSObject中是否有指定property的靠谱方法
- CRC-32校验和CRC-32校验代码
- Eclipse自动生成作者、日期注释等功能设置
- org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in