示例#1
0
 private void CreateOrLoadGeneratedFileCache()
 {
     _generatedFileCache = GhostCompilerServiceUtils.Load <GeneratedFileGuidCache>(_generateCacheFilename);
     if (_generatedFileCache == null)
     {
         _generatedFileCache = CreateInstance <GeneratedFileGuidCache>();
     }
 }
 public CompilationContext(UnityEditor.Compilation.Assembly assembly, GeneratedFileGuidCache cache, Dictionary <string, GhostCodeGen> genCache)
 {
     assemblyName          = assembly.name;
     assemblyNameGenerated = AssemblyNameGenerated(assembly.name);
     compilerCache         = cache;
     generatedAssembly     = default;
     generatedBatch        = default;
     isRuntimeAssembly     = !assembly.flags.HasFlag(AssemblyFlags.EditorAssembly) &&
                             !assembly.compiledAssemblyReferences.Any(a => a.EndsWith("nunit.framework.dll"));
     codeGenCache = genCache;
 }
示例#3
0
        private void LoadFileCache()
        {
            if (_fileCache != null)
            {
                return;
            }

            _fileCache = GhostCompilerServiceUtils.Load <GeneratedFileGuidCache>(_cachePath);
            if (_fileCache == null)
            {
                _fileCache = ScriptableObject.CreateInstance <GeneratedFileGuidCache>();
            }
        }
示例#4
0
 public GhostCompiler(GeneratedFileGuidCache fileCache, string cachePath)
 {
     _fileCache = fileCache;
     _cachePath = cachePath;
 }
 public GhostCompilerFolderSync(GeneratedFileGuidCache cache, SyncOptions syncOptions)
 {
     options       = syncOptions;
     compilerCache = cache;
     _numChanges   = 0;
 }