C# Class RedBlueGames.Tools.Utilities

Class that stores generic Utiliities that have no other home.
ファイルを表示 Open project: redbluegames/rb-unity-tools

Public Methods

Method Description
ConvertFileToTexture2D ( string path ) : Texture2D

Loads a file stored at a path and returns it as a Texure2D in Unity.

CopyStringToBuffer ( string copyString ) : void

Copies the string to the OS buffer.

OpenURL ( string url ) : void

Opens the URL in a new window if webplayer build, otherwise uses the behavior built into Application.OpenURL which depends on the platform.

WriteTextureToDisk ( Texture2D texture, string outputDirectory, string filename ) : void

Writes a Texture to Disk

Method Details

ConvertFileToTexture2D() public static method

Loads a file stored at a path and returns it as a Texure2D in Unity.
public static ConvertFileToTexture2D ( string path ) : Texture2D
path string Path to file.
return UnityEngine.Texture2D

CopyStringToBuffer() public static method

Copies the string to the OS buffer.
public static CopyStringToBuffer ( string copyString ) : void
copyString string String to copy.
return void

OpenURL() public static method

Opens the URL in a new window if webplayer build, otherwise uses the behavior built into Application.OpenURL which depends on the platform.
public static OpenURL ( string url ) : void
url string URL to open.
return void

WriteTextureToDisk() public static method

Writes a Texture to Disk
public static WriteTextureToDisk ( Texture2D texture, string outputDirectory, string filename ) : void
texture UnityEngine.Texture2D Texture to write.
outputDirectory string Output directory.
filename string Output filename.
return void