Hello.
I am working on a multiple platform project, that communicates using TCP/IP protocol. Right now I have issues with automatic enabling a network when necessary.
Is there a possibility to turn on USB tethering using C# script on Android Device, on which the Unity project is running?
Thank you for any help.
This is far outside the scope of Unity scripting. I don’t even know what kind of “tethering” you are speaking of (USB? Bluetooth? Something else?), but generally anything that sets up a proper TCP/IP network can be accessed by Unity if you can determine its IP address and just access it directly using UnityWebRequest, assuming there’s something at the other end listening.
Good luck!
Hello.
What I mean is that. I have Unity game on Android and I require to turn on USB tethering on that device. I do not think that I need IP address, because it is localhost.
Thank you.
Tethering means using your phone to connect your computer to the internet.
If your game is on Android, why would you want to do this?
Regardless, people won’t like it when you start messing with their network settings and run up their bills.
This project is not quite a game. It is some kind of system, on which we collect data gathered from Unity game.
Considering the situation, where the android device is connected to the PC, I need to start tethering automatically. Right now I am doing it manually, but I want to automatize this process.