【发布时间】:2020-02-11 09:33:08
【问题描述】:
我正在使用 ADB 从在连接的 Android 设备上运行的 Unity 构建的应用程序登录 Windows PowerShell。 我只对我自己在脚本中调用的消息感兴趣,例如UnityEngine.Debug.Log("## State set to SolvingAnchor"),但 Unity 在此消息中附加了 8 行:
- .\adb logcat -s Unity -e "^[#]{2}" -m 1
- ---------崩溃开始
- ---------系统开始
- --------- main 开始
- 02-11 10:07:42.658 8293 8315 I Unity:## 状态设置为 SolvingAnchor
- 02-11 10:07:42.658 8293 8315 I Unity: UnityEngine.DebugLogHandler:LogFormat(LogType, Object, 字符串,对象[])
- 02-11 10:07:42.658 8293 8315 我团结: UnityEngine.Logger:Log(LogType, Object)
- 02-11 10:07:42.658 8293 8315 I Unity:UnityEngine.Debug:Log(Object)
- 02-11 10:07:42.658 8293 8315 我团结: Assets.Scripts.TrackedImageHandler:SetState(State)
02-11 10:07:42.658 8293 8315 I 统一:Assets.Scripts.TrackedImageHandler:Update()
02-11 10:07:42.658 8293 8315 我团结:
- 02-11 10:07:42.658 8293 8315我统一:(文件名:./Runtime/Export/Debug/Debug.bindings.h 行:35)
- 02-11 10:07:42.658 8293 8315 我团结:
正如我所希望的那样,正则表达式的输出过滤不能正常工作。 有没有办法只打印消息并跳过 Unity 生成的冗余行?
【问题讨论】:
标签: android unity3d adb remote-debugging