android下调试unity3d应用
原地址:http://blog.csdn.net/armoonwei/article/details/7032455
目前貌似不支持断点调试,但可以通过日志打印(logcat)来跟踪。 在android SDK中有个adb工具,使用此工具来跟踪运行的android应用: adb logcat 启动logcat,并将设备上运行的android应用的运行时信息全部打印出来。 adb logcat -s Unity 如果只想打印Unity的输出信息,使用此命令。 adb logcat -d > logcat.txt 将打印信息输出为文件。 当然,更直接的做法是在应用中集成自己的调试信息窗口,将如下代码关联到一个gameobject: [csharp] view plaincopy
<p>using UnityEngine;
using System.Collections;</p><p>public class GuiTextDebug : MonoBehaviour
{
private float windowPosition = -440.0f;
private int positionCheck = ;
private static string windowText = "";
private Vector2 scrollViewVector = Vector2.zero;
private GUIStyle debugBoxStyle; private float leftSide = 0.0f;
private float debugWidth = 420.0f; public bool debugIsOn = false; public static void debug(string newString)
{
windowText = newString + "\n" + windowText;
UnityEngine.Debug.Log(newString);
} void Start()
{
debugBoxStyle = new GUIStyle();
debugBoxStyle.alignment = TextAnchor.UpperLeft;
leftSide = ;
} void OnGUI()
{
if (debugIsOn)
{
GUI.depth = ;
GUI.BeginGroup(new Rect(windowPosition, 40.0f, leftSide, 200.0f)); scrollViewVector = GUI.BeginScrollView(new Rect (, 0.0f, debugWidth, 200.0f),
scrollViewVector,
new Rect (0.0f, 0.0f, 400.0f, 2000.0f));
GUI.Box(new Rect(, 0.0f, debugWidth - 20.0f, 2000.0f), windowText, debugBoxStyle);
GUI.EndScrollView(); GUI.EndGroup (); if (GUI.Button(new Rect(leftSide, 0.0f,75.0f,40.0f), "调试"))
{
if (positionCheck == )
{
windowPosition = -440.0f;
positionCheck = ;
}
else
{
windowPosition = leftSide;
positionCheck = ;
}
} if (GUI.Button(new Rect(leftSide + 80f,0.0f,75.0f,40.0f),"清除"))
{
windowText = "";
}
}
}
}
</p>
android下调试unity3d应用的更多相关文章
- (转)<Unity3D>Unity3D在android下调试
转自:http://blog.csdn.net/zuoyamin/article/details/11827309 一.工具准备 1.JDK——由于android是基于Java平台开发的,jdk是必须 ...
- android下调试声卡驱动之概述
在Android中音频系统使用的是ALSA系统架构.ASoC--ALSA System on Chip .是建立在标准ALSA驱动层上,为了更好地支持 嵌入式处理器和移动设备中的音频Codec的一套软 ...
- Ubuntu杂记——Ubuntu下以USB方式连接Android手机调试
在Ubuntu下进行Android开发,发现自己的手机就算打开USB连接.USB调试还是连不上,一直都是显示??????.百度了很多,发现都是要改“ /etc/udev/rules.d/50-andr ...
- 使用Monitor调试Unity3D Android程序日志输出(非DDMS和ADB)
使用Monitor调试Unity3D Android程序日志输出(非DDMS和ADB) http://www.cnblogs.com/mrkelly/p/4015245.html 以往调试Androi ...
- android下vulkan与opengles纹理互通
先放demo源码地址:https://github.com/xxxzhou/aoce 06_mediaplayer 效果图: 主要几个点: 用ffmpeg打开rtmp流. 使用vulkan Compu ...
- 【转】你所不知道的Android Studio调试技巧
这篇写Android studio debug技巧个人觉得写得不错,转自:http://www.jianshu.com/p/011eb88f4e0d# Android Studio目前已经成为开发An ...
- 你所不知道的Android Studio调试技巧
转载:http://www.jianshu.com/p/011eb88f4e0d Android Studio目前已经成为开发Android的主要工具,用熟了可谓相当顺手.作为开发者,调试并发现bug ...
- 转:RTC搭建android下三层应用程序访问服务器MsSql-客户端
原文:http://www.cnblogs.com/delphi007/p/3346084.html android下stringgrid已知问题: 通过点击时获取对应行的值有问题,在win下调试正常 ...
- Android Studio调试功能使用总结【转】
Android Studio调试功能使用总结[转] 这段时间一直在使用Intellij IDEA, 今天把调试区工具的使用方法记录于此. 先编译好要调试的程序. 1.设置断点 选定要设置断点的代码 ...
随机推荐
- Android的按钮单击事件及监听器四种常见的实现方式
第一种:匿名内部类作为事件监听器类<ignore_js_op>大部分时候,事件处理器都没有什么利用价值(可利用代码通常都被抽象成了业务逻辑方法),因此大部分事件监听器只是临时使用一次,所以 ...
- HTML中的<select>标签如何设置默认选中的选项
方法有两种. 第一种通过<select>的属性来设置选中项,此方法可以在动态语言如php在后台根据需要控制输出结果. 1 2 3 4 5 < select id = " ...
- Objective-C 【@property和@synthesize关键字】
------------------------------------------- @property关键字的使用及注意事项 直接上代码和注释了! // //@property关键字的使用 //① ...
- OpenGL8-直接分配显存-极速绘制(2)
视频教程请关注 http://edu.csdn.net/lecturer/lecturer_detail?lecturer_id=440/*** OpenGL8-直接分配显存-极速绘制(Opengl1 ...
- 【转】404、500、502等HTTP状态码介绍
基本涵盖了所有问题HTTP 400 – 请求无效HTTP 401.1 – 未授权:登录失败HTTP 401.2 – 未授权:服务器配置问题导致登录失败HTTP 401.3 – ACL 禁止访问资源HT ...
- vs工程链接出现error LNK2005...already defined
今天使用vs2008编译工程无错误,链接过程,出现很多这样的错误: error LNK2005: "public: __thiscall std::basic_string<char, ...
- thinkphp 前后版本ajaxReturn方法的分别
之前用的是thinkphp2的版本现在改到thinkphp3.2已上的版本,发现ajaxReturn这个方法返回的数据不一样了,现在做下记录 thinkphp2的ajaxReturn的实现原码 pro ...
- 《编写高质量代码-Web前端开发修改之道》笔记--第二章 团队合作
本章内容: 揭秘前端开发工程师 欲精一行,必先通十行 增加代码的可读性--注释 提高重用性--公共组件和私有组件的维护 冗余和精简的矛盾--选择集中还是选择分散 磨刀不误砍柴工--前期的构思很重要 制 ...
- mysql table readonly
if the table does not have primary key or unique non-nullable defined, then MySql workbench could no ...
- Implement Custom Cache Dependencies in ASP.NET 1.x
Code download available at:CuttingEdge0407.exe(128 KB) Contents What's a Cache Dependency, Anyway? ...