#netcode will just not work on Android
1 messages · Page 1 of 1 (latest)
For the moment just direct connections i belive. They way i do it is on one application running the app NetworkManager.Singleton.StartHost() and on another one NetworkManager.Singleton.StartClient()
The client will have to enter the IP address of the host if you do it that way
Okay! But why wont the Android start a host either? And also where do i put the ip?
UnityTransport.SetConnectionData()
https://docs-multiplayer.unity3d.com/netcode/current/components/networkmanager/#connecting
The NetworkManager is a required Netcode for GameObjects component that has all of your project's netcode-related settings. Think of it as the central netcode hub for your netcode-enabled project.
the android device should be able to start a host. You'll need to check for errors
Got it and then later when i am gonna switch to using servers i just put the serves ip instead?
Ok
right. or use the Relay service
Do i have to enter the port aswell?
getting this error 😦 Assets\select.cs(30,55): error CS0246: The type or namespace name 'UnityTransport' could not be found (are you missing a using directive or an assembly reference?)
when trying to pass the ip
NetworkManager.Singleton.GetComponent<UnityTransport>().SetConnectionData(
"192.168.1.205"
);
You will need to be using Unity.Netcode.Transports.UTP
Ahh okay thanks
@meager sundial idk why but it still wont work. and i dont know how to see like the console or anything for what happning on my phone so idk how to debug it.
the problem is probably something with connecting two devices ( also i am on the same wifi so it is not that)
using an Android?
Youll need to make sure that the app has network permissions. But ADB logcat will be your best friend in debugging android builds
https://docs.unity3d.com/Packages/com.unity.mobile.android-logcat@1.4/manual/index.html
How do i make sure it has networks permissions?
Player Settings
Ok
i managed to get it wokring thanks for all the help