Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Question Peer-to-peer help.

Discussion in 'Unity Transport' started by VentaGames, Mar 7, 2023.

  1. VentaGames


    Jul 9, 2021
    Hi there, i want to add to my game peer-to-peer mode over BT/WiFi.
    Googling has not helped much. Any advice, on what service to use and why?
    I've checked Unity's Relay service, it does a lot that i don't need, e.g. networking.
    I just want android/ios players can challenge each other and play sitting in the same room.
    Even, if i go with Relay, i'm not sure how that free 50 CCU/month are applied.
    I'm new to network games here, so, please forgive me i asked dumb questions,
    but i need some help.
    Thanks in advance.
  2. simon-lemay-unity


    Unity Technologies

    Jul 19, 2021
    If you want multiple devices to connect to each other, you'll need some networking at least. ;)

    If it can help your search, what you're looking to achieve is local area networking. If you search for "LAN" you'll find more information about this. You can use a service like Unity Relay to achieve your goal, but if all your devices will be on the same local network, that's not really necessary. You will generally want one player to assume the role of game host, and have other players (clients) connect to it using the host's local IP address. If you don't want players to deal with details like IP addresses, there are solutions that allows clients to find the host automatically. This is normally called network discovery (here's an example implementation).