Merge pull request #56 from theo-rapidfire/fix/use-type-cache
Performance improvement: Use TypeCache instead of manual type iteration
This commit is contained in:
commit
2b40c3d26e
@ -27,9 +27,8 @@ namespace MackySoft.SerializeReferenceExtensions.Editor
|
||||
{
|
||||
Type[] interfaceTypes = type.GetInterfaces();
|
||||
|
||||
foreach (Assembly assembly in AppDomain.CurrentDomain.GetAssemblies())
|
||||
{
|
||||
foreach (Type drawerType in assembly.GetTypes())
|
||||
var types = TypeCache.GetTypesWithAttribute<CustomPropertyDrawer>();
|
||||
foreach (Type drawerType in types)
|
||||
{
|
||||
var customPropertyDrawerAttributes = drawerType.GetCustomAttributes(typeof(CustomPropertyDrawer), true);
|
||||
foreach (CustomPropertyDrawer customPropertyDrawer in customPropertyDrawerAttributes)
|
||||
@ -75,7 +74,6 @@ namespace MackySoft.SerializeReferenceExtensions.Editor
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user