private void CollectPluginsRegistry(PluginArray arr, RegistryKey key)
        {
            foreach (string v in key.GetSubKeyNames())
            {
                // Open it up:
                RegistryKey pluginData = key.OpenSubKey(v);

                Plugin p = new Plugin();

                // General meta:
                p.dllPath = pluginData.GetValue("Path", "") as string;

                p.description = pluginData.GetValue("Description", "") as string;
                p.name        = pluginData.GetValue("ProductName", "") as string;
                p.vendor      = pluginData.GetValue("Vendor", "") as string;
                p.version     = pluginData.GetValue("Version", "") as string;

                // May have an optional 'MimeTypes' folder:
                RegistryKey mimeTypes = pluginData.OpenSubKey("MimeTypes");

                List <PluginMimeType> types = new List <PluginMimeType>();

                if (mimeTypes != null)
                {
                    foreach (string mT in mimeTypes.GetSubKeyNames())
                    {
                        // Open it up:
                        RegistryKey mtData = mimeTypes.OpenSubKey(mT);

                        // Add:
                        types.Add(new PluginMimeType(mT, mtData.GetValue("Description", "") as string));

                        // Map:
                        PluginMap[mT] = p;
                    }
                }

                p.mimeTypes = types.ToArray();
            }
        }
        // private void CollectPluginsDir(PluginArray arr,string dir){}
                #endif

        /// <summary>Loads the Gecko plugin list.</summary>
        private void LoadPluginList()
        {
            PluginArray arr = new PluginArray();

            PluginMap     = new Dictionary <string, Plugin>();
            LoadedPlugins = arr;

                        #if UNITY_STANDALONE_WIN
            /*
             * // Get moz path:
             * string mozPath=System.Environment.GetEnvironmentVariable("MOZ_PLUGIN_PATH");
             *
             * if(mozPath!=null){
             *
             *      CollectPluginsDir(arr,mozPath);
             *
             * }
             *
             * if(Directory.Exists("%APPDATA%\\Mozilla\\plugins")){
             *
             *      CollectPluginsDir(arr,"%APPDATA%\\Mozilla\\plugins");
             *
             * }
             */

            // From the registry:
            try{
                CollectPluginsRegistry(arr, Registry.CurrentUser.OpenSubKey("Software\\MozillaPlugins"));
            }catch {
                // Privs
            }

            try{
                CollectPluginsRegistry(arr, Registry.LocalMachine.OpenSubKey("Software\\MozillaPlugins"));
            }catch {
                // Privs
            }
                        #endif
        }