Ejemplo n.º 1
0
        public void CompileScriptsAndReloadUserDomain()
        {
            PluginCompiler.SetOutputPath(CustomAssemblyPath);

            PluginLoader.UserAssemblyPath = CustomAssemblyPath;
            PluginLoader.UserAssemblyName = CustomAssemblyName;
            PluginLoader.DestroyUserAppDomain();

            var scriptAssets = AssetManager.Assets.Where(a => a.Path.EndsWith(FileExtensions.PluginD));
            var scriptValues = scriptAssets.Select(a => a.Importer.Value).Where(s => s != null).Cast <string>();

            PluginCompiler.CompileCode(scriptValues.ToArray());
        }