Hi there.
My goal is to create a local-multiplayer game over WIFI. The game will run on one device (server). This device shows the playing field with the player characters moving around and projectiles and whatnot.
The Android devices connecting to the server (the clients) are supposed to only show an analog stick and some buttons.
How do I get the input from the Android devices to the server?
Right now I use the HLAPI and two cameras. If you’re a client only the UI is shown, but in the background the game is running. That seems inefficient.
I cannot help you in a futher detail, but you can create functions as commands for the server to get called by every client like MoveForward, MoveRight etc.
https://docs.unity3d.com/ScriptReference/Networking.CommandAttribute.html
This way is a goo way to tell te server to do specific things and you can even do server side calculations and checks to prevent cheating.
A quick way to prevent rendering of the scene is to make the camera only render UI elements. This is not the best way to prevent the running of the game in the background but already helps with the intensity of rendering done.