Exemple #1
0
        public static void LoadPlugins()
        {
            string[] strs = File.ReadAllLines(PLUGIN_CONFIG_FILE);

            foreach (string s in strs)
            {
                PluginInfo info = Parse(s);

                IClientPlugin plugin = Assist.CreateInstanceFromAssembly <IClientPlugin>(info.assembly, info.className);

                if (plugin != null)
                {
                    plugins.Add(plugin);
                    plugin.OnClientPluginEvent(ClientPluginEvent.PluginLoaded, null);
                }
            }

            Debug.Log("ClientPluginController: plugins=" + plugins.Count);
        }