Detailed Description

Precompiles modules/ libraries so they don't get rebuilt by Unity every time any source file changes. This can be used by any of your modules too, so do make use of this side feature to really speed up your build times!

Static Public Member Functions

static void Recompile (string moduleName, bool editorMode)
 Re-compiles the given module, optionally with UNITY_EDITOR defined. Must have already been precompiled. You can find if it has been with GetModule. More...
 
static Module GetModule (string moduleName)
 Gets the precompile settings for a given "module" - that's just a group of files compiled together. More...
 
static void Reverse (string moduleName)
 Reverses the precompilation of a particular module. Restores the source files back into the Assets folder. More...
 
static void Precompile (List< string > paths, string moduleName, bool editor)
 Creates a precompile module for the given source paths. It's then precompiled, optionally in editor mode. More...
 
static bool Build (bool editor, string moduleName, SourceFileSet files)
 Builds the given set of files into the given module using standard compiler args. More...
 
static string GetFlags (bool editor)
 Gets the Unity provided set of compiler flags. More...
 
static void AddUnityDllPaths (bool editor, StringCollection references)
 Adds the paths to the UnityEngine/Editor dlls to the given collection. More...
 
static void DeleteDirectory (string path)
 Deletes a folder and everything within it. Note that this is only used when deleting a backup. More...
 

Static Public Attributes

static string Path ="Precompiled"
 The path to where source and precompile info is stored. This folder sits alongside the Assets folder in your project. More...
 

Member Function Documentation

static void Pico.Precompiler.AddUnityDllPaths ( bool  editor,
StringCollection  references 
)
inlinestatic

Adds the paths to the UnityEngine/Editor dlls to the given collection.

static bool Pico.Precompiler.Build ( bool  editor,
string  moduleName,
SourceFileSet  files 
)
inlinestatic

Builds the given set of files into the given module using standard compiler args.

static void Pico.Precompiler.DeleteDirectory ( string  path)
inlinestatic

Deletes a folder and everything within it. Note that this is only used when deleting a backup.

static string Pico.Precompiler.GetFlags ( bool  editor)
inlinestatic

Gets the Unity provided set of compiler flags.

static Module Pico.Precompiler.GetModule ( string  moduleName)
inlinestatic

Gets the precompile settings for a given "module" - that's just a group of files compiled together.

static void Pico.Precompiler.Precompile ( List< string >  paths,
string  moduleName,
bool  editor 
)
inlinestatic

Creates a precompile module for the given source paths. It's then precompiled, optionally in editor mode.

Parameters
pathsPaths to folders containing source code.
moduleNameA name which represents this group of files. This can be used to reverse the precompilation, or recompile.
editorTrue if it should be precompiled in editor mode (with UNITY_EDITOR).
static void Pico.Precompiler.Recompile ( string  moduleName,
bool  editorMode 
)
inlinestatic

Re-compiles the given module, optionally with UNITY_EDITOR defined. Must have already been precompiled. You can find if it has been with GetModule.

static void Pico.Precompiler.Reverse ( string  moduleName)
inlinestatic

Reverses the precompilation of a particular module. Restores the source files back into the Assets folder.

Member Data Documentation

string Pico.Precompiler.Path ="Precompiled"
static

The path to where source and precompile info is stored. This folder sits alongside the Assets folder in your project.