Unity3d WIfi direct (P2P) android support

ぐ巨炮叔叔 提交于 2020-08-03 09:12:30

问题


I am trying to figure out how to make game which will work only locally using Wifi Direct without any internet access.

The concept is very simple. It will be some kind of presentation so I need to have one master/host device and other connected devices will be slaves/clients. When I press button on master/host than should be changed only one value (string or int) in all slaves/clients devices. With support of 20-40 connected devices in same time.

I have Tried:

  1. UNet - it works only if it is connected to some router with use of local IP's but it does not support Wifi direct communication.
  2. I have tried to find some plugins but I cannot decide which to choose or get information about support of Wifi direct.
  3. I tried to find some other solution like Bluetooth but it supports only 4-13 connected devices at same time but I need to he connected around 20-40 devices in same time.

List of plugins I have found:

  1. Forge Networking - https://www.assetstore.unity3d.com/en/#!/content/38344

    1.1 I do not know if this supports a feature i required.

  2. WifiDirect Plugin - https://www.assetstore.unity3d.com/en/#!/content/50112

    2.1. This plugins have errors and have no support.

What I would like to ask about:

  1. Does 1. plugin support Wifi direct?
  2. Do you think That I should buy 2. plugin and try to fix it and hopefully I can find a problem and it will work?
  3. Do you know some better or "any" solution how to solve this problem?

I am interested in any tips and help how to make it work.

Thank you very much for your help!

Jakub Kučera


回答1:


After research I have realised a working solution!

Unity Asset Store: https://www.assetstore.unity3d.com/kr/#!/content/53955

Video of usage: Video

Plugin I have tested on a few Android devices and it works for Wifi Direct with no connection to internet.

This plugin supports much more than that for example:

  • TCP
  • Client / Server
  • Complete C# 2.0 native
  • Stand alone library (DLL)
  • Multi-Thread
  • Event Driven
  • Support [Binary/Json] message data
  • Log Server & MySQL Sample Code

New Feature

  • Unreliable UDP
  • MNF Server based WinFrom without MySql

I hope it helps somebody else!

And I would like to say thanks to author and his support!



来源:https://stackoverflow.com/questions/39621902/unity3d-wifi-direct-p2p-android-support

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!