ExtractEmbededFilesInEditor Class Reference

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.

Static Public Member Functions

static bool ConvertTextureAssetToIcon (string textureAssetPath)
 Confirms the Asset is a Texture, then adjusts it's import settings such that it may be used as an icon in unity editor. If the asset is not a texture, returns true immediately, but does nothing else.
 
static bool ConvertTextureAssetToSprite (string textureAssetPath)
 Takes the path of an image file asset and generates a TextureImporter for it, which configures the image import as a spite.
 
static void DeleteFileOrUnzippedFileIfExists (string filePathAndName)
 checks to see if the file exists, and deletes it if so.
 
static void PromptUserToConfirmDeleteOfExtractedFiles ()
 Prompts the user to confirm deletion of any of these files (or their unzipped version) from the file-system.
 
static void PromptUserToExtractFilesAndPotentiallyOverwrite (bool logToConsole=true, bool promptOnCreation=true)
 Prompts the user to create/overwrite folders and files as necessary, and if granted permission, does so. This function should be invoked when a module is loaded. Note: this function will return and do NOTHING, if in play-mode.
 
static void PromptUserToExtractMissingRegisteredFilesNow (bool logToConsole=true, bool promptOnCreation=true)
 Prompts the user to extract any missing files, opening the prompt window immediately.
 
static void RegisterFileForExtraction (List< ExtractEmbededFiles.ExtractionInfo > filesToExtract)
 Checks to see if all of the files provided in the parameters are in place, if so, returns. Otherwise, prompts the user to create folders and files as necessary, and if granted perm9ssion, does so. This function should be invoked when a module is loaded. Note: this function will return and do NOTHING, if in play-mode.