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 NGO with Relay documentation problem.

Discussion in 'Netcode for GameObjects' started by HRDev, Jan 16, 2023.

  1. HRDev

    HRDev

    Joined:
    Jun 4, 2018
    Posts:
    60
    Hello to everyone i'm following this documentation: https://docs.unity.com/relay/relay-and-ngo.html
    but here:
    Code (CSharp):
    1. NetworkManager.Singleton.GetComponent<UnityTransport>().SetRelayServerData(relayServerData);
    i have this firm :

    SetRelayServerData(String, UInt16, Byte[], Byte[], Byte[], Byte[], Boolean)

    and i can't convert from byte* to byte[] beacause is unsafe code in iteration...
    how can i solve it?
     
  2. simon-lemay-unity

    simon-lemay-unity

    Unity Technologies

    Joined:
    Jul 19, 2021
    Posts:
    441
    Which version of NGO are you using? The version of
    SetRelayServerData
    which only takes a
    RelayServerData
    object was introduced in 1.1.0. The version with 7 parameters is the old form, which is still available, but is not recommended anymore.