Wanzyee Studio

URL and some options for WwwLoader, cast from string to create if use URL only. More...

Public Member Functions

 WwwOption (string url, WWWForm form=null, float timeout=0f, TimeSpan cache=default, bool sync=false)
 Initialize each value specified. More...
 
override string ToString ()
 Return the url. More...
 

Static Public Member Functions

static implicit operator WwwOption (string url)
 Convert a URL string to WwwOption. More...
 

Public Attributes

readonly string url
 The URL to download or post, it must be "%" escaped, as UnityEngine.WWW API. More...
 
WWWForm form
 The UnityEngine.WWWForm used to post values or bytes. More...
 
float timeout
 The timeout seconds to interrupt the loading process when over a positive time. More...
 
TimeSpan cache
 The lifetime of cache file. More...
 
bool sync
 Sync flag to block the main thread while loading. More...
 

Detailed Description

URL and some options for WwwLoader, cast from string to create if use URL only.

Constructor & Destructor Documentation

WwwOption ( string  url,
WWWForm  form = null,
float  timeout = 0f,
TimeSpan  cache = default,
bool  sync = false 
)

Initialize each value specified.

Parameters
urlURL.
formForm.
timeoutTimeout.
cacheCache.
syncIf set to true sync.
Returns
The instance.

Member Function Documentation

override string ToString ( )

Return the url.

Returns
A string represents this.
static implicit operator WwwOption ( string  url)
static

Convert a URL string to WwwOption.

Parameters
urlThe URL.
Returns
The WwwOption.

Member Data Documentation

readonly string url

The URL to download or post, it must be "%" escaped, as UnityEngine.WWW API.

WWWForm form

The UnityEngine.WWWForm used to post values or bytes.

float timeout

The timeout seconds to interrupt the loading process when over a positive time.

TimeSpan cache

The lifetime of cache file.

By default, always to load cache file if exists, or not to if given negative. Otherwise, load existed or update it if exceeded positive life limit before now.

bool sync

Sync flag to block the main thread while loading.