C# Class UnityEngine.WWW

Inheritance: Object, IDisposable
Show file Open project: CarlosHBC/UnityDecompiled Class Usage Examples

Private Properties

Property Type Description
CheckSecurityOnHeaders void
DestroyWWW void
EscapeURL string
FlattenedHeadersFrom string[]
GetAudioClipInternal AudioClip
GetTextEncoder Encoding
GetTexture Texture2D
GetTextureFromURL Texture2D
GetURL string
INTERNAL_CALL_WWW void
InitWWW void
LoadFromCacheOrDownload WWW
LoadFromCacheOrDownload WWW
LoadImageIntoTexture void
LoadUnityWeb void
ParseHTTPHeaderString string>.Dictionary
UnEscapeURL string
WWW System
enforceWebSecurityRestrictions bool

Public Methods

Method Description
Dispose ( ) : void

Disposes of an existing WWW object.

EscapeURL ( string s, [ e ) : string

Escapes characters in a string to ensure they are URL-friendly.

GetAudioClip ( bool threeD ) : AudioClip

Returns an AudioClip generated from the downloaded data (Read Only).

GetAudioClip ( bool threeD, bool stream ) : AudioClip

Returns an AudioClip generated from the downloaded data (Read Only).

GetAudioClip ( bool threeD, bool stream, AudioType audioType ) : AudioClip

Returns an AudioClip generated from the downloaded data (Read Only).

GetAudioClipCompressed ( ) : AudioClip

Returns an AudioClip generated from the downloaded data that is compressed in memory (Read Only).

GetAudioClipCompressed ( bool threeD ) : AudioClip

Returns an AudioClip generated from the downloaded data that is compressed in memory (Read Only).

GetAudioClipCompressed ( bool threeD, AudioType audioType ) : AudioClip

Returns an AudioClip generated from the downloaded data that is compressed in memory (Read Only).

LoadFromCacheOrDownload ( string url, Hash128 hash, [ crc ) : WWW
LoadFromCacheOrDownload ( string url, int version, [ crc ) : WWW

Loads an AssetBundle with the specified version number from the cache. If the AssetBundle is not currently cached, it will automatically be downloaded and stored in the cache for future retrieval from local storage.

UnEscapeURL ( string s, [ e ) : string

Converts URL-friendly escape sequences back to normal text.

WWW ( string url ) : System

Creates a WWW request with the given URL.

WWW ( string url, WWWForm form ) : System

Creates a WWW request with the given URL.

WWW ( string url, byte postData ) : System

Creates a WWW request with the given URL.

WWW ( string url, byte postData, string>.Dictionary headers ) : System

Private Methods

Method Description
CheckSecurityOnHeaders ( string headers ) : void
DestroyWWW ( bool cancel ) : void
EscapeURL ( string s ) : string
FlattenedHeadersFrom ( string>.Dictionary headers ) : string[]
GetAudioClipInternal ( bool threeD, bool stream, bool compressed, AudioType audioType ) : AudioClip
GetTextEncoder ( ) : Encoding
GetTexture ( bool markNonReadable ) : Texture2D
GetTextureFromURL ( string url ) : Texture2D
GetURL ( string url ) : string
INTERNAL_CALL_WWW ( WWW self, string url, Hash128 &hash, uint crc ) : void
InitWWW ( string url, byte postData, string iHeaders ) : void
LoadFromCacheOrDownload ( string url, Hash128 hash ) : WWW
LoadFromCacheOrDownload ( string url, int version ) : WWW
LoadImageIntoTexture ( Texture2D tex ) : void
LoadUnityWeb ( ) : void
ParseHTTPHeaderString ( string input ) : string>.Dictionary
UnEscapeURL ( string s ) : string
WWW ( string url, Hash128 hash, uint crc ) : System
enforceWebSecurityRestrictions ( ) : bool

Method Details

Dispose() public method

Disposes of an existing WWW object.

public Dispose ( ) : void
return void

EscapeURL() public static method

Escapes characters in a string to ensure they are URL-friendly.

public static EscapeURL ( string s, [ e ) : string
s string A string with characters to be escaped.
e [ The text encoding to use.
return string

GetAudioClip() public method

Returns an AudioClip generated from the downloaded data (Read Only).

public GetAudioClip ( bool threeD ) : AudioClip
threeD bool Use this to specify whether the clip should be a 2D or 3D clip /// the .audioClip property defaults to 3D.
return AudioClip

GetAudioClip() public method

Returns an AudioClip generated from the downloaded data (Read Only).

public GetAudioClip ( bool threeD, bool stream ) : AudioClip
threeD bool Use this to specify whether the clip should be a 2D or 3D clip /// the .audioClip property defaults to 3D.
stream bool Sets whether the clip should be completely downloaded before it's ready to play (false) or the stream can be played even if only part of the clip is downloaded (true). /// The latter will disable seeking on the clip (with .time and/or .timeSamples).
return AudioClip

GetAudioClip() public method

Returns an AudioClip generated from the downloaded data (Read Only).

public GetAudioClip ( bool threeD, bool stream, AudioType audioType ) : AudioClip
threeD bool Use this to specify whether the clip should be a 2D or 3D clip /// the .audioClip property defaults to 3D.
stream bool Sets whether the clip should be completely downloaded before it's ready to play (false) or the stream can be played even if only part of the clip is downloaded (true). /// The latter will disable seeking on the clip (with .time and/or .timeSamples).
audioType AudioType The AudioType of the content your downloading. If this is not set Unity will try to determine the type from URL.
return AudioClip

GetAudioClipCompressed() public method

Returns an AudioClip generated from the downloaded data that is compressed in memory (Read Only).

public GetAudioClipCompressed ( ) : AudioClip
return AudioClip

GetAudioClipCompressed() public method

Returns an AudioClip generated from the downloaded data that is compressed in memory (Read Only).

public GetAudioClipCompressed ( bool threeD ) : AudioClip
threeD bool Use this to specify whether the clip should be a 2D or 3D clip.
return AudioClip

GetAudioClipCompressed() public method

Returns an AudioClip generated from the downloaded data that is compressed in memory (Read Only).

public GetAudioClipCompressed ( bool threeD, AudioType audioType ) : AudioClip
threeD bool Use this to specify whether the clip should be a 2D or 3D clip.
audioType AudioType The AudioType of the content your downloading. If this is not set Unity will try to determine the type from URL.
return AudioClip

LoadFromCacheOrDownload() public static method

public static LoadFromCacheOrDownload ( string url, Hash128 hash, [ crc ) : WWW
url string
hash Hash128
crc [
return WWW

LoadFromCacheOrDownload() public static method

Loads an AssetBundle with the specified version number from the cache. If the AssetBundle is not currently cached, it will automatically be downloaded and stored in the cache for future retrieval from local storage.

public static LoadFromCacheOrDownload ( string url, int version, [ crc ) : WWW
url string The URL to download the AssetBundle from, if it is not present in the cache. Must be '%' escaped.
version int Version of the AssetBundle. The file will only be loaded from the disk cache if it has previously been downloaded with the same version parameter. By incrementing the version number requested by your application, you can force Caching to download a new copy of the AssetBundle from url.
crc [ An optional CRC-32 Checksum of the uncompressed contents. If this is non-zero, then the content will be compared against the checksum before loading it, and give an error if it does not match. You can use this to avoid data corruption from bad downloads or users tampering with the cached files on disk. If the CRC does not match, Unity will try to redownload the data, and if the CRC on the server does not match it will fail with an error. Look at the error string returned to see the correct CRC value to use for an AssetBundle.
return WWW

UnEscapeURL() public static method

Converts URL-friendly escape sequences back to normal text.

public static UnEscapeURL ( string s, [ e ) : string
s string A string containing escaped characters.
e [ The text encoding to use.
return string

WWW() public method

Creates a WWW request with the given URL.

public WWW ( string url ) : System
url string The url to download. Must be '%' escaped.
return System

WWW() public method

Creates a WWW request with the given URL.

public WWW ( string url, WWWForm form ) : System
url string The url to download. Must be '%' escaped.
form WWWForm A WWWForm instance containing the form data to post.
return System

WWW() public method

Creates a WWW request with the given URL.

public WWW ( string url, byte postData ) : System
url string The url to download. Must be '%' escaped.
postData byte A byte array of data to be posted to the url.
return System

WWW() public method

public WWW ( string url, byte postData, string>.Dictionary headers ) : System
url string
postData byte
headers string>.Dictionary
return System