Fix displaying Game and Editor plugins to be batched in Editor
This commit is contained in:
committed by
Wojtek Figat
parent
439f74c540
commit
10d66fb871
@@ -201,11 +201,13 @@ namespace FlaxEditor.Windows
|
|||||||
toRemove.Add(e.Value);
|
toRemove.Add(e.Value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (toRemove != null)
|
if (toRemove != null)
|
||||||
{
|
{
|
||||||
foreach (var plugin in toRemove)
|
foreach (var plugin in toRemove)
|
||||||
OnPluginRemove(plugin);
|
OnPluginRemove(plugin);
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (var plugin in gamePlugins)
|
foreach (var plugin in gamePlugins)
|
||||||
OnPluginAdd(plugin);
|
OnPluginAdd(plugin);
|
||||||
foreach (var plugin in editorPlugins)
|
foreach (var plugin in editorPlugins)
|
||||||
@@ -222,6 +224,16 @@ namespace FlaxEditor.Windows
|
|||||||
if (plugin is EditorPlugin editorPlugin && GetPluginEntry(editorPlugin.GamePluginType) != null)
|
if (plugin is EditorPlugin editorPlugin && GetPluginEntry(editorPlugin.GamePluginType) != null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// Special case for game plugins (merge with editor plugin if has linked)
|
||||||
|
if (plugin is GamePlugin)
|
||||||
|
{
|
||||||
|
foreach (var e in _entries.Keys)
|
||||||
|
{
|
||||||
|
if (e is EditorPlugin ee && ee.GamePluginType == plugin.GetType())
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var desc = plugin.Description;
|
var desc = plugin.Description;
|
||||||
var category = _categories.Find(x => string.Equals(x.Text, desc.Category, StringComparison.OrdinalIgnoreCase));
|
var category = _categories.Find(x => string.Equals(x.Text, desc.Category, StringComparison.OrdinalIgnoreCase));
|
||||||
if (category == null)
|
if (category == null)
|
||||||
|
|||||||
Reference in New Issue
Block a user