obsidian/笔记文件/2.笔记/lua显示堆栈.md
2025-03-26 00:02:56 +08:00

39 lines
695 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#unity/日常积累
这个是监听Unity打印事件的
![[Pasted image 20220426163751.png]]
将这个方法通过action委托发出去给lua的
![[Pasted image 20220426164037.png]]
其中的LogTypeInfo是自定义类
![[Pasted image 20220426164431.png]]
定义如图所示:
![[Pasted image 20220426164501.png]]
这里也是有做初始化操作的;
![[Pasted image 20220426164630.png]]
lua端的绑定
![[Pasted image 20220426164711.png]]
是会发送一个事件;
![[Pasted image 20220426164738.png]]
这是接收事件的地方:
![[Pasted image 20220426164826.png]]
处理接受到的数据,分类;
![[Pasted image 20220426164906.png]]