Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unity 工程没有webSocket链接示例吗? #185

Closed
Mortal-XJ opened this issue Dec 22, 2024 · 3 comments
Closed

unity 工程没有webSocket链接示例吗? #185

Mortal-XJ opened this issue Dec 22, 2024 · 3 comments

Comments

@Mortal-XJ
Copy link

在unity中没看到webSocket示例

@sniper00
Copy link
Owner

在unity中没看到webSocket示例

暂时没有Unity websocket示例, 不过加上应该比Tcp的简单, 有空我加一下

@sniper00
Copy link
Owner

添加了websocket 示例

  1. 修改server 切换websocket gate https://github.com/sniper00/MoonDemo/blob/master/server/main_game.lua#L94
  2. 修改client https://github.com/sniper00/MoonDemo/blob/master/BallAction/Assets/Scripts/Login/Login.cs#L54. 使用Moon.SocketProtocolType.Ws 连接服务器

@Mortal-XJ
Copy link
Author

感谢 @sniper00

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants