Search Unity

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

Resolved Websocket client endpoint with url

Discussion in 'Unity Transport' started by KingCrab_Solutions, Sep 10, 2023.

  1. KingCrab_Solutions

    KingCrab_Solutions

    Joined:
    Jul 28, 2014
    Posts:
    7
    Hi,
    is there any way to use the existing websocket transport with a url like a.b.c.d:xxxx/ws?access=TOKEN. I only found solutions for ip and port so far, but I need to open it with an additional path und parameters.

    Thanks in advance
     
  2. simon-lemay-unity

    simon-lemay-unity

    Unity Technologies

    Joined:
    Jul 19, 2021
    Posts:
    416
    When you write "existing websocket transport", do you mean the community transport or the WebSocket support that ships with Unity Transport 2.0?

    If the former (community transport), you can try setting the
    WebSocketTransport.Path
    property on your transport instance. Although I don't know if this is meant to pass only the path or if it will handle parameters too. If the latter (Unity Transport 2.0), there is no way to set the path currently. That's something we do plan on adding though.
     
  3. KingCrab_Solutions

    KingCrab_Solutions

    Joined:
    Jul 28, 2014
    Posts:
    7
    Sorry, I was a bit unclear on that. I meant the one from Unity Transport 2.0.
    I will have a look at the community transport, maybe parameters will work.
    Thanks