Search Unity

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:
    58
    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.