The wrapper class for WWW.
It allows you to control requests.
To create is recommended to use OnlineMapsUtils.GetWWW.
More...
Inherits CustomYieldInstruction, and IDisposable.
|
| | OnlineMapsWWW (string url) |
| | Constructor.
|
| |
| | OnlineMapsWWW (StringBuilder url) |
| | Constructor.
|
| |
| | OnlineMapsWWW (string url, RequestType type, string reqID) |
| | Constructor.
|
| |
|
void | Dispose () |
| | Disposes of an existing object.
|
| |
| void | LoadImageIntoTexture (Texture2D tex) |
| | Replaces the contents of an existing Texture2D with an image from the downloaded data.
|
| |
| void | SetBytes (string responseHeadersString, byte[] _bytes) |
| | Sets the contents and headers of the response for type = direct.
|
| |
| void | SetError (string errorStr) |
| | Sets the error for type = direct.
|
| |
|
| static string | EscapeURL (string s) |
| | Escapes characters in a string to ensure they are URL-friendly.
|
| |
|
|
Action< OnlineMapsWWW > | OnComplete |
| | Event that occurs when a request is completed.
|
| |
|
|
static Action< OnlineMapsWWW > | OnCreateRequest |
| | Called when a request has been created but not yet sent.
|
| |
|
static Func< string, string > | OnInit |
| | This event is occurs when URL is initialized, and allows you to modify it.
|
| |
|
static Predicate< string > | OnValidate |
| | Events to validate the request. Return false if you want to cancel the request.
|
| |
|
| object | this[string key] [get, set] |
| | Gets / sets custom fields value by key.
|
| |
|
byte[] | bytes [get] |
| | Returns the contents of the fetched web page as a byte array.
|
| |
|
int | bytesDownloaded [get] |
| | The number of bytes downloaded by this query.
|
| |
|
Dictionary< string, object > | customFields [get] |
| | Gets customFields dictionary.
|
| |
|
string | error [get] |
| | Returns an error message if there was an error during the download.
|
| |
|
bool | hasError [get] |
| | This property is true if the request has encountered an error.
|
| |
|
string | id [get] |
| | ID of query.
|
| |
|
bool | isDone [get] |
| | Is the download already finished?
|
| |
| override bool | keepWaiting [get] |
| | Gets a value indicating whether this coroutine should continue executing.
|
| |
| UnityWebRequest | request [get] |
| | Gets the UnityWebRequest object for this request.
|
| |
|
Dictionary< string, string > | responseHeaders [get] |
| | Dictionary of headers returned by the request.
|
| |
|
string | text [get] |
| | Returns the contents of the fetched web page as a string.
|
| |
|
string | url [get] |
| | The URL of this request.
|
| |
The wrapper class for WWW.
It allows you to control requests.
To create is recommended to use OnlineMapsUtils.GetWWW.
◆ RequestType
Type of request.
| Enumerator |
|---|
| direct | The request will be processed independently.
Use OnlineMapsUtils.OnGetWWW to process of request.
|
| www | The request will be processed using WWW or UnityWebClient class.
|
◆ OnlineMapsWWW() [1/3]
| OnlineMapsWWW.OnlineMapsWWW |
( |
string | url | ) |
|
◆ OnlineMapsWWW() [2/3]
| OnlineMapsWWW.OnlineMapsWWW |
( |
StringBuilder | url | ) |
|
◆ OnlineMapsWWW() [3/3]
| OnlineMapsWWW.OnlineMapsWWW |
( |
string | url, |
|
|
RequestType | type, |
|
|
string | reqID ) |
Constructor.
- Parameters
-
| url | URL of request |
| type | Type of request |
| reqID | Request ID |
◆ EscapeURL()
| static string OnlineMapsWWW.EscapeURL |
( |
string | s | ) |
|
|
static |
Escapes characters in a string to ensure they are URL-friendly.
- Parameters
-
| s | A string with characters to be escaped. |
- Returns
- Escaped string.
◆ LoadImageIntoTexture()
| void OnlineMapsWWW.LoadImageIntoTexture |
( |
Texture2D | tex | ) |
|
Replaces the contents of an existing Texture2D with an image from the downloaded data.
- Parameters
-
| tex | An existing texture object to be overwritten with the image data. |
◆ SetBytes()
| void OnlineMapsWWW.SetBytes |
( |
string | responseHeadersString, |
|
|
byte[] | _bytes ) |
Sets the contents and headers of the response for type = direct.
- Parameters
-
| responseHeadersString | Headers of response. |
| _bytes | Content of response. |
◆ SetError()
| void OnlineMapsWWW.SetError |
( |
string | errorStr | ) |
|
Sets the error for type = direct.
- Parameters
-
◆ keepWaiting
| override bool OnlineMapsWWW.keepWaiting |
|
get |
Gets a value indicating whether this coroutine should continue executing.
True if the coroutine should continue waiting; otherwise, false.
◆ request
| UnityWebRequest OnlineMapsWWW.request |
|
get |
Gets the UnityWebRequest object for this request.
- Returns
- The UnityWebRequest object.
◆ this[string key]
| object OnlineMapsWWW.this[string key] |
|
getset |
Gets / sets custom fields value by key.
- Parameters
-
- Returns
- Custom field value