Provides functions used to get images from, and extract files a .dll, into the unity Project folder. Upon invocation, the main function,RegisterFileForExtraction, will check to see if the files exist in the file system, and if not extracts then saves them to the project folder. Optionally, extracted files, may be passed through the ConvertTextureAssetToIcon function. This is done automatically when the ExtractionInfo.importTextureAsIcon for the file to extract is set to true.
|
struct | ExtractionInfo |
| Stores the source and destination information for a file that may, potentially, be extracted from a DLL into the file system.
|
|
|
static bool | ExtractAndSaveFileFromDLL (Assembly dllAssembly, string filename, string assetPath, string dllNamespace, bool logToConsole=false) |
| Checks if the file already exists in the file system, and returns immediately, if so. Otherwise, it extracts the file from DLL, and saves it to the files system as an asset, in the Unity project's assets folder.
|
|
static byte[] | ExtractFileToByteArray (Assembly dllAssembly, string filename, string dllNamespace, bool logToConsole=false) |
| Extracts the file from the dll specified, and returns the data found inside as a byte array
|
|
static string | ExtractFileToString (Assembly dllAssembly, string filename, string dllNamespace, bool logToConsole=false) |
| Extracts the file from the dll specified, and returns the data found inside as a string. It is assumes the data in the file makes a valid string, but does not confirm.
|
|
static bool | FileExistsAndIsNotZeroLength (string filePathAndName) |
| Checks if the file exists, and if it does, that it does not have a zero length.
|
|
static bool | FileOrUnzippedFileExists (string filePathAndName) |
| checks if both the file exists in the destination. Removes any trailing ".gzip" from provided filename for this check.
|
|
static string | FixPath (string str) |
| given a path string, will convert all forward slashes or backward slashes to whichever is valid for the current OS's paths.
|
|