C# Class TextureBogusExtension, mapa-de-calor

Add a feature to the Texture class which allows you to detect the case when you have attempted to download a bogus WWW Texture. by Matt "Trip" Maker, Monstrous Company :: http://monstro.us TODO could also use the filesystem cache to keep the example error image between runs. from http://unifycommunity.com/wiki/index.php?title=TextureBogusExtensions
Show file Open project: divisiondeariza/mapa-de-calor Class Usage Examples

Public Properties

Property Type Description
ready bool

Public Methods

Method Description
Equivalent ( Array, bytes1, Array, bytes2 ) : bool

Compare two byte arrays.

Init ( MonoBehaviour, bhv ) : void

Get an example of whatever the current "error" texture is. (At the time of this writing, an "upside down red question mark on a white background".)

asPNGDeclaration ( Texture, tex ) : string

Express the texture in the form of the C# code that would be necessary to represent a PNG of it.

isBogus ( Array, png ) : bool
isBogus ( Texture, tex ) : bool

The easy way: compare to a saved version of the question mark image, expressed here as an array of bytes.

obtainExampleBogusTexture ( ) : IEnumerator,

Method Details

Equivalent() public static method

Compare two byte arrays.
public static Equivalent ( Array, bytes1, Array, bytes2 ) : bool
bytes1 Array, /// A ///
bytes2 Array, /// A ///
return bool

Init() public static method

Get an example of whatever the current "error" texture is. (At the time of this writing, an "upside down red question mark on a white background".)
public static Init ( MonoBehaviour, bhv ) : void
bhv MonoBehaviour,
return void

asPNGDeclaration() public static method

Express the texture in the form of the C# code that would be necessary to represent a PNG of it.
public static asPNGDeclaration ( Texture, tex ) : string
tex Texture, /// A ///
return string

isBogus() public static method

public static isBogus ( Array, png ) : bool
png Array,
return bool

isBogus() public static method

The easy way: compare to a saved version of the question mark image, expressed here as an array of bytes.
public static isBogus ( Texture, tex ) : bool
tex Texture, /// A ///
return bool

obtainExampleBogusTexture() public static method

public static obtainExampleBogusTexture ( ) : IEnumerator,
return IEnumerator,

Property Details

ready public static property

public static bool ready
return bool