The wrapper class for WWW.
It allows you to control requests.
To create is recommended to use OnlineMapsUtils.GetWWW.
More...
Inherits CustomYieldInstruction, and IDisposable.
|
static string | EscapeURL (string s) |
| Escapes characters in a string to ensure they are URL-friendly. More...
|
|
|
static Action< OnlineMapsWWW > | OnCreateRequest |
| Called when a request has been created but not yet sent. More...
|
|
static Func< string, string > | OnInit |
| This event is occurs when URL is initialized, and allows you to modify it. More...
|
|
static Predicate< string > | OnValidate |
| Events to validate the request. Return false if you want to cancel the request. More...
|
|
|
object? | this[string key] [get, set] |
| Gets / sets custom fields value by key More...
|
|
byte[] | bytes [get] |
| Returns the contents of the fetched web page as a byte array. More...
|
|
int? | bytesDownloaded [get] |
| The number of bytes downloaded by this query. More...
|
|
Dictionary< string, object > | customFields [get] |
| Gets customFields dictionary More...
|
|
string | error [get] |
| Returns an error message if there was an error during the download. More...
|
|
bool | hasError [get] |
| This property is true if the request has encountered an error. More...
|
|
string | id [get] |
| ID of query. More...
|
|
bool | isDone [get] |
| Is the download already finished? More...
|
|
override bool | keepWaiting [get] |
| Gets a value indicating whether this coroutine should continue executing. More...
|
|
UnityWebRequest | request [get] |
| Gets the UnityWebRequest object for this request. More...
|
|
Dictionary< string, string > | responseHeaders [get] |
| Dictionary of headers returned by the request. More...
|
|
string? | text [get] |
| Returns the contents of the fetched web page as a string. More...
|
|
string | url [get] |
| The URL of this request. More...
|
|
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 |
◆ Dispose()
void OnlineMapsWWW.Dispose |
( |
| ) |
|
Disposes of an existing object.
◆ 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
-
◆ OnComplete
Event that occurs when a request is completed.
◆ OnCreateRequest
Called when a request has been created but not yet sent.
◆ OnInit
Func<string, string> OnlineMapsWWW.OnInit |
|
static |
This event is occurs when URL is initialized, and allows you to modify it.
◆ OnValidate
Predicate<string> OnlineMapsWWW.OnValidate |
|
static |
Events to validate the request. Return false if you want to cancel the request.
◆ bytes
byte [] OnlineMapsWWW.bytes |
|
get |
Returns the contents of the fetched web page as a byte array.
◆ bytesDownloaded
int? OnlineMapsWWW.bytesDownloaded |
|
get |
The number of bytes downloaded by this query.
◆ customFields
Dictionary<string, object> OnlineMapsWWW.customFields |
|
get |
Gets customFields dictionary
◆ error
string OnlineMapsWWW.error |
|
get |
Returns an error message if there was an error during the download.
◆ hasError
bool OnlineMapsWWW.hasError |
|
get |
This property is true if the request has encountered an error.
◆ id
◆ isDone
bool OnlineMapsWWW.isDone |
|
get |
Is the download already finished?
◆ 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.
◆ responseHeaders
Dictionary<string, string> OnlineMapsWWW.responseHeaders |
|
get |
Dictionary of headers returned by the request.
◆ text
string? OnlineMapsWWW.text |
|
get |
Returns the contents of the fetched web page as a string.
◆ this[string key]
object? OnlineMapsWWW.this[string key] |
|
getset |
Gets / sets custom fields value by key
- Parameters
-
- Returns
- Custom field value
◆ url