I am trying to use Mapbox but I am receiving this error in the code provided in the SDK.
namespace Mapbox.Unity.Utilities
{
using System;
using UnityEngine.Networking;
using System.Collections;
using Mapbox.Platform;
using UnityEngine;
#if UNITY_EDITOR
using UnityEditor;
#endif
internal sealed class HTTPRequest : IAsyncRequest
{
private UnityWebRequest _request;
private readonly Action _callback;
private UnityWebRequest timeout;
public bool IsCompleted { get; private set; }
public HTTPRequest(string url, Action callback, int timeout)
{
//UnityEngine.Debug.Log("HTTPRequest: " + url);
IsCompleted = false;
_request = UnityWebRequest.Get(url);
_request.timeout = timeout;
_callback = callback;
Assets/Mapbox/Unity/Utilities/HTTPRequest.cs(33,13): error CS1061: Type `UnityEngine.Networking.UnityWebRequest' does not contain a definition for `timeout' and no extension method `timeout' of type `UnityEngine.Networking.UnityWebRequest' could be found. Are you missing an assembly reference?
Can anyone help me solve this?
↧