Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Resolved I can't use a ChromeOS device as Server in Unity Transport

Discussion in 'Multiplayer' started by Headshoves, Nov 22, 2023.

  1. Headshoves

    Headshoves

    Joined:
    Apr 22, 2020
    Posts:
    7
    I'm developing a a application wich I use a ChromeOS device as Server and Android Devices as Client. But when I try to start a Server in ChromeOS, I can't connect clients in this Server.
    I tried the reverse case (Android Server and ChromeOS Client) and that works, but use the ChromeOS as Server don't work.

    The Application don't show any error in execution, just this case when I try to connect the both devices.

    I'm using of base the "Simple client and Server" code in Unity Transport API.

    Link of Reference: https://docs.unity3d.com/Packages/com.unity.transport@2.0/manual/client-server-simple.html
     
  2. simon-lemay-unity

    simon-lemay-unity

    Unity Technologies

    Joined:
    Jul 19, 2021
    Posts:
    416
    I'm assuming you're using Android builds of your application to run a server on ChromeOS? If so, I'm not sure ChromeOS allows that. This section of the ChromeOS documentation mentions that as a general rule, inbound connections will be blocked, which would prevent running servers. The documentation also explains how Android apps are behind a NAT on ChromeOS, which would tend to indicate that you'd need some kind of port forwarding to reach an Android app from a different device. I found this bit of documentation that shows how to set that up on ChromeOS, but unfortunately that looks more like a developer option than something that can be used for a deployed product.

    If you must use the ChromeOS device as a server, you'd need to rely on a third party to broker a connection between the server and clients. Basically both server and clients will connect to a third-party service that will pass the traffic to and from each other. This is what we usually call a relay service. Unity offers one, but there are others out there too.
     
  3. Headshoves

    Headshoves

    Joined:
    Apr 22, 2020
    Posts:
    7
    Thank you for the informations. I will follow this line of having an intermediary