0.8.0: Fixed issue, where a compiler error could result in a cascade of reflection exceptions from the toolbar
This commit is contained in:
parent
ca34993eb3
commit
6fc88d3986
|
|
@ -133,11 +133,15 @@ namespace Module.NavigationTool.Editor.Toolbar
|
|||
}
|
||||
|
||||
public static AbstractToolbarDrawer[] GetAllDrawers()
|
||||
{
|
||||
var list = new List<AbstractToolbarDrawer>(8);
|
||||
|
||||
try
|
||||
{
|
||||
Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies();
|
||||
Type iType = typeof(AbstractToolbarDrawer);
|
||||
|
||||
var list = new List<AbstractToolbarDrawer>(8);
|
||||
|
||||
|
||||
for (var i = 0; i < assemblies.Length; i++)
|
||||
{
|
||||
|
|
@ -152,6 +156,11 @@ namespace Module.NavigationTool.Editor.Toolbar
|
|||
list.Add((AbstractToolbarDrawer)FormatterServices.GetUninitializedObject(type));
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
// Fail silently
|
||||
}
|
||||
|
||||
return list.ToArray();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "com.module.navigationtool",
|
||||
"version": "0.7.2",
|
||||
"version": "0.8.0",
|
||||
"displayName": "Module.NavigationTool",
|
||||
"description": "Support for navigation tools, like favorites, history and toolbars",
|
||||
"unity": "2019.2",
|
||||
|
|
|
|||
Loading…
Reference in a new issue