aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/PluginLoader.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/PluginLoader.cs')
-rw-r--r--OpenSim/Framework/PluginLoader.cs12
1 files changed, 10 insertions, 2 deletions
diff --git a/OpenSim/Framework/PluginLoader.cs b/OpenSim/Framework/PluginLoader.cs
index 497d9f5..440e0d5 100644
--- a/OpenSim/Framework/PluginLoader.cs
+++ b/OpenSim/Framework/PluginLoader.cs
@@ -171,6 +171,7 @@ namespace OpenSim.Framework
171 if (filters.ContainsKey (ext)) 171 if (filters.ContainsKey (ext))
172 filter = filters [ext]; 172 filter = filters [ext];
173 173
174 List<T> loadedPlugins = new List<T>();
174 foreach (PluginExtensionNode node in AddinManager.GetExtensionNodes (ext)) 175 foreach (PluginExtensionNode node in AddinManager.GetExtensionNodes (ext))
175 { 176 {
176 log.Info("[PLUGINS]: Trying plugin " + node.Path); 177 log.Info("[PLUGINS]: Trying plugin " + node.Path);
@@ -179,8 +180,15 @@ namespace OpenSim.Framework
179 continue; 180 continue;
180 181
181 T plugin = (T) node.CreateInstance(); 182 T plugin = (T) node.CreateInstance();
182 Initialiser.Initialise (plugin); 183 loadedPlugins.Add(plugin);
183 Plugins.Add (plugin); 184 }
185 // We do Initialise() in a second loop after CreateInstance
186 // So that modules who need init before others can do it
187 // Example: Script Engine Component System needs to load its components before RegionLoader starts
188 foreach (T plugin in loadedPlugins)
189 {
190 Initialiser.Initialise(plugin);
191 Plugins.Add(plugin);
184 } 192 }
185 } 193 }
186 } 194 }