I am using Relay and Multiplayer Game Services. When creating a relay I am using the following code:
using UnityEngine;
using Unity.Services.Relay;
using Unity.Services.Relay.Models;
public class TestRelay : MonoBehaviour
{
private async void CreateRelay()
{
try
{
Allocation allocation = await Relay.Instance.CreateAllocationAsync(3);
string joinCode = await Relay.Instance.GetJoinCodeAsync(allocation.AllocationId);
} catch(RelayServiceException e)
{
Debug.Log(e);
}
}
}
However I am getting the following errors:
Assets\Scripts\Network\TestRelay.cs(12,13): error CS0433: The type âAllocationâ exists in both âUnity.Services.Multiplayer, Version=0.0.0.0, Culture=neutral, PublicKeyToken=nullâ and âUnity.Services.Relay, Version=0.0.0.0, Culture=neutral, PublicKeyToken=nullâ
and
Assets\Scripts\Network\TestRelay.cs(16,17): error CS0433: The type âRelayServiceExceptionâ exists in both âUnity.Services.Multiplayer, Version=0.0.0.0, Culture=neutral, PublicKeyToken=nullâ and âUnity.Services.Relay, Version=0.0.0.0, Culture=neutral, PublicKeyToken=nullâ
I am using Unity 6000.0.2.26f1 and Multiplayer Services 1.0.2 with Relay 1.0.5