Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by nyush-rits · Jan 30, 2018 at 07:19 AM · networkinghttpwebrequest

UnityWebRequest timeout not containing

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<Response> _callback;
             private UnityWebRequest timeout;
     
             public bool IsCompleted { get; private set; }
     
             public HTTPRequest(string url, Action<Response> 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?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by WilfridLefebvre · Jan 31, 2018 at 06:09 PM

Hi @nyush-rits, I just noticed the same trouble when trying to use my code on my Mac running Unity v5.5.2f1. The UnityEngine.Networking.UnityWebRequest.timeout is well recognized on my PC running Unity v5.5.4f1 I'll try to update my Mac and let you know...

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image WilfridLefebvre · Jan 31, 2018 at 06:24 PM 0
Share

Bingo !!! Timeout property was added on 5.5.4 !!! => https://unity3d.com/fr/unity/whats-new/unity-5.5.4 :


I$$anonymous$$PROVE$$anonymous$$ENTS :

  • Added support for the 5th generation iPad.

  • AssetBundles: Reduced SerializedFile memory usage when reading streams inside AssetBundles

  • Build Pipeline: Exceptions thrown during the build process (e.g. by user callbacks) are now treated the same as logged errors, from a reporting and Strict$$anonymous$$ode point of view.

  • Graphics: Added function to allow cube map textures to be compressed from script like their Texture2D counterparts

  • Networking: Added a timeout property to UnityWebRequest. This gives coarse grain control over timeouts for webrequests. (900900)

avatar image nyush-rits · Feb 01, 2018 at 06:32 AM 0
Share

Hey! Thanks for your reply, I am already running 5.6.0f3 I have managed to bypass the problem by commenting out timeout but I don't think that is the best solution right now

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

108 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Any way to speed up WWW requests? 2 Answers

Where to continue in Response/request? 0 Answers

HTTP Requests removed on Android Pie (API 28+) 2 Answers

Unity networking tutorial? 6 Answers

Is HttpWebRequest supported for desktop and editor? 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges