public override void OnDetach() { Log.ND_TRACE("C# scripting detached"); if (loader != null) { loader.DetachLayers(); loader = null; } }
public override void OnAttach() { Log.ND_TRACE("C# scripting attached: Cold\n -> Loading assembly"); AssemblyLocator.InitPaths(); AssemblyLocator.CheckForModification(); AssemblyLocator.CopyAssembly(); if (!File.Exists(AssemblyLocator.DOMAIN_PATH)) { Log.ND_ERROR("Cannot load dll: " + AssemblyLocator.DOMAIN_PATH); return; } loader = new ProxyAssLoader(); loader.LoadFrom(AssemblyLocator.DOMAIN_PATH); loader.LoadLayers(); loader.AttachLayers(); }