https://github.com/akof1314/unity-editorconnectionexample
EditorConnectionExample
https://github.com/akof1314/unity-editorconnectionexample
Last synced: about 2 months ago
JSON representation
EditorConnectionExample
- Host: GitHub
- URL: https://github.com/akof1314/unity-editorconnectionexample
- Owner: akof1314
- Created: 2021-03-28T11:36:22.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-03-28T11:44:32.000Z (about 4 years ago)
- Last Synced: 2025-03-23T22:14:03.486Z (2 months ago)
- Language: C#
- Size: 20.5 KB
- Stars: 8
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## 目的
实现与 Unity Profiler 一样可以连接手机进行通信,来接收 App 发送的信息或发送消息给 App,而 Unity 有开放 EditorConnection 和 PlayerConnection 接口,可以使用它们来实现。## 测试
Unity 2018 发布 App,记得选中 Development Build 以及 Autoconnect Profiler 选项。
自动连接成功,此时可以点击按钮进行发送消息。

手机上收到消息,显示在界面上。点击按钮可以发消息给编辑器。

编辑器也收到消息打印在控制台。
## 问题
目前发现的问题:
- 不能反注册连接和断开连接的事件
- App 上的连接和断开连接事件不一定会响应
- 如果断开后再连接的话,App 可以发送数据到编辑器,接收不到编辑器发送的数据## 源码
测试工程地址:[https://github.com/akof1314/Unity-EditorConnectionExample](https://github.com/akof1314/Unity-EditorConnectionExample)